diff options
author | Mike Frysinger <vapier@google.com> | 2021-02-23 15:43:07 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2021-02-25 20:12:51 +0000 |
commit | 23882b33feaa0104dcbe372a9fde496cffc2b246 (patch) | |
tree | 310fde7df842d1171c91dfbb20176ab6a823e3db /repo | |
parent | 92304bff004e05be2e1bfc3f32464d47cbff9c42 (diff) | |
download | git-repo-23882b33feaa0104dcbe372a9fde496cffc2b246.tar.gz |
init: support -b HEAD as a shortcut to "the default"
When people switch to non-default branches, they sometimes want to
switch back to the default, but don't know the exact name for that
branch. Add a -b HEAD shortcut for that.
Change-Id: I090230da25f9f5a169608115d483f660f555624f
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/297843
Reviewed-by: Michael Mortensen <mmortensen@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'repo')
-rwxr-xr-x | repo | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -289,8 +289,8 @@ def GetParser(gitc_init=False): | |||
289 | group = parser.add_option_group('Manifest options') | 289 | group = parser.add_option_group('Manifest options') |
290 | group.add_option('-u', '--manifest-url', | 290 | group.add_option('-u', '--manifest-url', |
291 | help='manifest repository location', metavar='URL') | 291 | help='manifest repository location', metavar='URL') |
292 | group.add_option('-b', '--manifest-branch', | 292 | group.add_option('-b', '--manifest-branch', metavar='REVISION', |
293 | help='manifest branch or revision', metavar='REVISION') | 293 | help='manifest branch or revision (use HEAD for default)') |
294 | group.add_option('-m', '--manifest-name', | 294 | group.add_option('-m', '--manifest-name', |
295 | help='initial manifest file', metavar='NAME.xml') | 295 | help='initial manifest file', metavar='NAME.xml') |
296 | cbr_opts = ['--current-branch'] | 296 | cbr_opts = ['--current-branch'] |