From f4dda9a1be396808fad0cda8316d3a0d6f839ee1 Mon Sep 17 00:00:00 2001 From: Naseer Ahmed Date: Thu, 1 Dec 2016 18:49:54 -0500 Subject: init: Add no-tags and current branch options This avoids fetching tags and branches for huge manifests Change-Id: I19c9724d75364440b881b297d42b906f541f73ff --- subcmds/init.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'subcmds/init.py') diff --git a/subcmds/init.py b/subcmds/init.py index 45d69b79..bb7187d7 100644 --- a/subcmds/init.py +++ b/subcmds/init.py @@ -91,6 +91,9 @@ to update the working directory files. g.add_option('-b', '--manifest-branch', dest='manifest_branch', help='manifest branch or revision', metavar='REVISION') + g.add_option('-c', '--current-branch', + dest='current_branch_only', action='store_true', + help='fetch only current manifest branch from server') g.add_option('-m', '--manifest-name', dest='manifest_name', default='default.xml', help='initial manifest file', metavar='NAME.xml') @@ -121,6 +124,9 @@ to update the working directory files. g.add_option('--no-clone-bundle', dest='no_clone_bundle', action='store_true', help='disable use of /clone.bundle on HTTP/HTTPS') + g.add_option('--no-tags', + dest='no_tags', action='store_true', + help="don't fetch tags in the manifest") # Tool g = p.add_option_group('repo Version options') @@ -231,7 +237,9 @@ to update the working directory files. sys.exit(1) if not m.Sync_NetworkHalf(is_new=is_new, quiet=opt.quiet, - clone_bundle=not opt.no_clone_bundle): + clone_bundle=not opt.no_clone_bundle, + current_branch_only=opt.current_branch_only, + no_tags=opt.no_tags): r = m.GetRemote(m.remote.name) print('fatal: cannot obtain manifest %s' % r.url, file=sys.stderr) -- cgit v1.2.3-54-g00ecf