diff options
author | Dan Willemsen <dwillemsen@google.com> | 2020-02-06 17:00:00 -0800 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2020-02-07 20:54:34 +0000 |
commit | 93293ca47f3a898b30eecf21e7b4e1038780c867 (patch) | |
tree | 4add8e7ad59cd604a89533bdc4a642807c870cc0 /subcmds | |
parent | dbd277ce500491cea14bdca48ccb0f9148e55b56 (diff) | |
download | git-repo-93293ca47f3a898b30eecf21e7b4e1038780c867.tar.gz |
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>
Diffstat (limited to 'subcmds')
-rw-r--r-- | subcmds/init.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index f4229f62..6594a602 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -99,7 +99,7 @@ to update the working directory files. | |||
99 | cbr_opts = ['--current-branch'] | 99 | cbr_opts = ['--current-branch'] |
100 | # The gitc-init subcommand allocates -c itself, but a lot of init users | 100 | # The gitc-init subcommand allocates -c itself, but a lot of init users |
101 | # want -c, so try to satisfy both as best we can. | 101 | # want -c, so try to satisfy both as best we can. |
102 | if gitc_init: | 102 | if not gitc_init: |
103 | cbr_opts += ['-c'] | 103 | cbr_opts += ['-c'] |
104 | g.add_option(*cbr_opts, | 104 | g.add_option(*cbr_opts, |
105 | dest='current_branch_only', action='store_true', | 105 | dest='current_branch_only', action='store_true', |