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; repo init -c
Test: repo gitc-init -u ... -b ... -c testing
Change-Id: I71e4950a49c281418249f0783c6a2ea34f0d3e2b
Reviewed-by: Mike Frysinger <>
Tested-by: Dan Willemsen <>
(cherry picked from commit 93293ca47f3a898b30eecf21e7b4e1038780c867)
diff --git a/subcmds/ b/subcmds/
index f4229f6..6594a60 100644
--- a/subcmds/
+++ b/subcmds/
@@ -99,7 +99,7 @@
     cbr_opts = ['--current-branch']
     # The gitc-init subcommand allocates -c itself, but a lot of init users
     # want -c, so try to satisfy both as best we can.
-    if gitc_init:
+    if not gitc_init:
       cbr_opts += ['-c']
                  dest='current_branch_only', action='store_true',