summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--git_command.py2
-rw-r--r--project.py11
2 files changed, 13 insertions, 0 deletions
diff --git a/git_command.py b/git_command.py
index 5d73c281..a1769270 100644
--- a/git_command.py
+++ b/git_command.py
@@ -158,6 +158,8 @@ def git_require(min_version, fail=False, msg=''):
158 158
159 159
160class GitCommand(object): 160class GitCommand(object):
161 """Wrapper around a single git invocation."""
162
161 def __init__(self, 163 def __init__(self,
162 project, 164 project,
163 cmdv, 165 cmdv,
diff --git a/project.py b/project.py
index 894fb38a..2b57a5fb 100644
--- a/project.py
+++ b/project.py
@@ -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: