diff --git a/git_command.py b/git_command.py index 5d73c281b..a1769270a 100644 --- a/git_command.py +++ b/git_command.py @@ -158,6 +158,8 @@ def git_require(min_version, fail=False, msg=''): class GitCommand(object): + """Wrapper around a single git invocation.""" + def __init__(self, project, cmdv, diff --git a/project.py b/project.py index 894fb38a8..2b57a5fb7 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: