From 597868b4c45bba380249b739c0cf49b868cc8741 Mon Sep 17 00:00:00 2001 From: Mitchel Humpherys Date: Mon, 29 Oct 2012 10:18:34 -0700 Subject: Add --no-tags option to prevent fetching of tags Add an option to pass `--no-tags' to `git fetch'. Change-Id: I4158cc369773e08e55a167091c38ca304a197587 Signed-off-by: Mitchel Humpherys --- subcmds/sync.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'subcmds/sync.py') diff --git a/subcmds/sync.py b/subcmds/sync.py index 228a279a..5c369a74 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -189,6 +189,9 @@ later is required to fix a server side protocol bug. p.add_option('--fetch-submodules', dest='fetch_submodules', action='store_true', help='fetch submodules from server') + p.add_option('--no-tags', + dest='no_tags', action='store_true', + help="don't fetch tags") if show_smart: p.add_option('-s', '--smart-sync', dest='smart_sync', action='store_true', @@ -235,7 +238,8 @@ later is required to fix a server side protocol bug. success = project.Sync_NetworkHalf( quiet=opt.quiet, current_branch_only=opt.current_branch_only, - clone_bundle=not opt.no_clone_bundle) + clone_bundle=not opt.no_clone_bundle, + no_tags=opt.no_tags) self._fetch_times.Set(project, time.time() - start) # Lock around all the rest of the code, since printing, updating a set @@ -273,7 +277,8 @@ later is required to fix a server side protocol bug. if project.Sync_NetworkHalf( quiet=opt.quiet, current_branch_only=opt.current_branch_only, - clone_bundle=not opt.no_clone_bundle): + clone_bundle=not opt.no_clone_bundle, + no_tags=opt.no_tags): fetched.add(project.gitdir) else: print('error: Cannot fetch %s' % project.name, file=sys.stderr) @@ -558,7 +563,8 @@ later is required to fix a server side protocol bug. if not opt.local_only: mp.Sync_NetworkHalf(quiet=opt.quiet, - current_branch_only=opt.current_branch_only) + current_branch_only=opt.current_branch_only, + no_tags=opt.no_tags) if mp.HasChanges: syncbuf = SyncBuffer(mp.config) -- cgit v1.2.3-54-g00ecf