mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Fix inverted logic around [gitc-]init and -c
Instead of not using '-c' for '--current-branch' when using gitc, we were only using '-c' when using gitc, so we still had the conflict with the gitc option, and other users still couldn't use '-c'. Test: repo init -u https://android.googlesource.com/platform/manifest; repo init -c Test: repo gitc-init -u ... -b ... -c testing Change-Id: I71e4950a49c281418249f0783c6a2ea34f0d3e2b Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/253795 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Dan Willemsen <dwillemsen@google.com>
This commit is contained in:
parent
dbd277ce50
commit
93293ca47f
@ -99,7 +99,7 @@ to update the working directory files.
|
|||||||
cbr_opts = ['--current-branch']
|
cbr_opts = ['--current-branch']
|
||||||
# The gitc-init subcommand allocates -c itself, but a lot of init users
|
# The gitc-init subcommand allocates -c itself, but a lot of init users
|
||||||
# want -c, so try to satisfy both as best we can.
|
# want -c, so try to satisfy both as best we can.
|
||||||
if gitc_init:
|
if not gitc_init:
|
||||||
cbr_opts += ['-c']
|
cbr_opts += ['-c']
|
||||||
g.add_option(*cbr_opts,
|
g.add_option(*cbr_opts,
|
||||||
dest='current_branch_only', action='store_true',
|
dest='current_branch_only', action='store_true',
|
||||||
|
Loading…
Reference in New Issue
Block a user