mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
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>
This commit is contained in:
parent
39cb17f7a3
commit
790f4cea7a
@ -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,
|
||||
|
11
project.py
11
project.py
@ -2671,6 +2671,7 @@ class Project(object):
|
||||
remote.Save()
|
||||
|
||||
def _InitMRef(self):
|
||||
"""Initialize the pseudo m/<manifest branch> 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 <project> 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:
|
||||
|
Loading…
Reference in New Issue
Block a user