summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2020-12-07 22:04:55 -0500
committerMike Frysinger <vapier@google.com>2022-08-18 17:31:01 +0000
commit790f4cea7aa95667296e0aa22eb0690df91c45e8 (patch)
tree0183dc9b3dc70ac28068b8aa69f9c2f43f0a5536 /project.py
parent39cb17f7a31d8f6d8b6bddfe4406cf2ff4ed31a6 (diff)
downloadgit-repo-790f4cea7aa95667296e0aa22eb0690df91c45e8.tar.gz
add a few more docs to existing funcs
Change-Id: I27317a59aba67c05ca1fd333e8f064c0edccb209 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/343185 Reviewed-by: LaMont Jones <lamontjones@google.com> Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'project.py')
-rw-r--r--project.py11
1 files changed, 11 insertions, 0 deletions
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: