summaryrefslogtreecommitdiffstats
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
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>
-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: