summaryrefslogtreecommitdiffstats
path: root/repo
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2022-08-18 07:28:42 -0400
committerMike Frysinger <vapier@google.com>2022-08-18 16:54:17 +0000
commit39cb17f7a31d8f6d8b6bddfe4406cf2ff4ed31a6 (patch)
treee097109e1103122b88356ce4c1271baf7697e697 /repo
parentad1b7bd2e2d4fb636bef03d4b056b2f9de1fbf19 (diff)
downloadgit-repo-39cb17f7a31d8f6d8b6bddfe4406cf2ff4ed31a6.tar.gz
init: use --current-branch by default
People rarely care about having all manifest branches locally. Change the default to only pull down the selected branch. If people want other branches, the -b option will fetch it automatically, or people can use --no-current-branch. This only applies to the manifest project syncing, not the rest of the projects that are in the checkout. Bug: https://crbug.com/gerrit/16194 Change-Id: Ia9e7e2f23b8028d82772db72dcc7d6c32260be79 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/343434 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: LaMont Jones <lamontjones@google.com>
Diffstat (limited to 'repo')
-rwxr-xr-xrepo6
1 files changed, 3 insertions, 3 deletions
diff --git a/repo b/repo
index c084b654..1940a319 100755
--- a/repo
+++ b/repo
@@ -149,7 +149,7 @@ if not REPO_REV:
149BUG_URL = 'https://bugs.chromium.org/p/gerrit/issues/entry?template=Repo+tool+issue' 149BUG_URL = 'https://bugs.chromium.org/p/gerrit/issues/entry?template=Repo+tool+issue'
150 150
151# increment this whenever we make important changes to this script 151# increment this whenever we make important changes to this script
152VERSION = (2, 21) 152VERSION = (2, 29)
153 153
154# increment this if the MAINTAINER_KEYS block is modified 154# increment this if the MAINTAINER_KEYS block is modified
155KEYRING_VERSION = (2, 3) 155KEYRING_VERSION = (2, 3)
@@ -325,9 +325,9 @@ def InitParser(parser, gitc_init=False):
325 # want -c, so try to satisfy both as best we can. 325 # want -c, so try to satisfy both as best we can.
326 if not gitc_init: 326 if not gitc_init:
327 cbr_opts += ['-c'] 327 cbr_opts += ['-c']
328 group.add_option(*cbr_opts, 328 group.add_option(*cbr_opts, default=True,
329 dest='current_branch_only', action='store_true', 329 dest='current_branch_only', action='store_true',
330 help='fetch only current manifest branch from server') 330 help='fetch only current manifest branch from server (default)')
331 group.add_option('--no-current-branch', 331 group.add_option('--no-current-branch',
332 dest='current_branch_only', action='store_false', 332 dest='current_branch_only', action='store_false',
333 help='fetch all manifest branches from server') 333 help='fetch all manifest branches from server')