From 790f4cea7aa95667296e0aa22eb0690df91c45e8 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 7 Dec 2020 22:04:55 -0500 Subject: 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 Tested-by: Mike Frysinger --- project.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'project.py') 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): remote.Save() def _InitMRef(self): + """Initialize the pseudo m/ ref.""" if self.manifest.branch: if self.use_git_worktrees: # Set up the m/ space to point to the worktree-specific ref space. @@ -2700,6 +2701,16 @@ class Project(object): self._InitAnyMRef(HEAD, self.bare_git) def _InitAnyMRef(self, ref, active_git, detach=False): + """Initialize |ref| in |active_git| to the value in the manifest. + + This points |ref| to the setting in the manifest. + + Args: + ref: The branch to update. + active_git: The git repository to make updates in. + detach: Whether to update target of symbolic refs, or overwrite the ref + directly (and thus make it non-symbolic). + """ cur = self.bare_ref.symref(ref) if self.revisionId: -- cgit v1.2.3-54-g00ecf