diff options
Diffstat (limited to 'project.py')
| -rw-r--r-- | project.py | 11 |
1 files changed, 11 insertions, 0 deletions
| @@ -2671,6 +2671,7 @@ class Project(object): | |||
| 2671 | remote.Save() | 2671 | remote.Save() |
| 2672 | 2672 | ||
| 2673 | def _InitMRef(self): | 2673 | def _InitMRef(self): |
| 2674 | """Initialize the pseudo m/<manifest branch> ref.""" | ||
| 2674 | if self.manifest.branch: | 2675 | if self.manifest.branch: |
| 2675 | if self.use_git_worktrees: | 2676 | if self.use_git_worktrees: |
| 2676 | # Set up the m/ space to point to the worktree-specific ref space. | 2677 | # Set up the m/ space to point to the worktree-specific ref space. |
| @@ -2700,6 +2701,16 @@ class Project(object): | |||
| 2700 | self._InitAnyMRef(HEAD, self.bare_git) | 2701 | self._InitAnyMRef(HEAD, self.bare_git) |
| 2701 | 2702 | ||
| 2702 | def _InitAnyMRef(self, ref, active_git, detach=False): | 2703 | def _InitAnyMRef(self, ref, active_git, detach=False): |
| 2704 | """Initialize |ref| in |active_git| to the value in the manifest. | ||
| 2705 | |||
| 2706 | This points |ref| to the <project> setting in the manifest. | ||
| 2707 | |||
| 2708 | Args: | ||
| 2709 | ref: The branch to update. | ||
| 2710 | active_git: The git repository to make updates in. | ||
| 2711 | detach: Whether to update target of symbolic refs, or overwrite the ref | ||
| 2712 | directly (and thus make it non-symbolic). | ||
| 2713 | """ | ||
| 2703 | cur = self.bare_ref.symref(ref) | 2714 | cur = self.bare_ref.symref(ref) |
| 2704 | 2715 | ||
| 2705 | if self.revisionId: | 2716 | if self.revisionId: |
