summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2020-02-06 17:00:00 -0800
committerMike Frysinger <vapier@google.com>2020-02-07 15:54:52 -0500
commit619a2b58871e03ecc4f40b93a183206b51853fa5 (patch)
treeaabcb4b544775376ef38351b88efb9d0f849fa43
parentab15e42fa4403a0354c936d8740f864300b00929 (diff)
downloadgit-repo-619a2b58871e03ecc4f40b93a183206b51853fa5.tar.gz
Fix inverted logic around [gitc-]init and -cv1.13.9.4
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> (cherry picked from commit 93293ca47f3a898b30eecf21e7b4e1038780c867)
-rw-r--r--subcmds/init.py2
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',