mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-11-13 22:37:51 +08:00
init: rename --repo-branch to --repo-rev
We refer to this as "revision" in help text, and in REPO_REV envvar, so rename to --repo-rev to be consistent. We keep --repo-branch for backwards compatibility, but as a hidden option. Bug: https://crbug.com/gerrit/11045 Change-Id: I1ecc282fba32917ed78a63850360c08469db849a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/259352 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
This commit is contained in:
committed by
David Pursehouse
parent
e1111f5710
commit
58ac1678e8
6
repo
6
repo
@@ -328,8 +328,10 @@ def GetParser(gitc_init=False):
|
||||
group = parser.add_option_group('repo Version options')
|
||||
group.add_option('--repo-url', metavar='URL',
|
||||
help='repo repository location ($REPO_URL)')
|
||||
group.add_option('--repo-branch', metavar='REVISION',
|
||||
group.add_option('--repo-rev', metavar='REV',
|
||||
help='repo branch or revision ($REPO_REV)')
|
||||
group.add_option('--repo-branch', dest='repo_rev',
|
||||
help=optparse.SUPPRESS_HELP)
|
||||
group.add_option('--no-repo-verify',
|
||||
dest='repo_verify', default=True, action='store_false',
|
||||
help='do not verify repo source code')
|
||||
@@ -473,7 +475,7 @@ def _Init(args, gitc_init=False):
|
||||
opt.verbose = opt.output_mode is True
|
||||
|
||||
url = opt.repo_url or REPO_URL
|
||||
branch = opt.repo_branch or REPO_REV
|
||||
branch = opt.repo_rev or REPO_REV
|
||||
|
||||
if branch.startswith('refs/heads/'):
|
||||
branch = branch[len('refs/heads/'):]
|
||||
|
||||
Reference in New Issue
Block a user