summaryrefslogtreecommitdiffstats
path: root/subcmds/sync.py
diff options
context:
space:
mode:
authorMitchel Humpherys <mitchelh@codeaurora.org>2012-10-29 10:18:34 -0700
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2013-02-27 11:00:49 +0900
commit597868b4c45bba380249b739c0cf49b868cc8741 (patch)
tree938a73ec3df796449207c695a4ee316d4886b0fe /subcmds/sync.py
parent75b4c2deac9ff23a5a3c24b3d2450cd23ae3d705 (diff)
downloadgit-repo-597868b4c45bba380249b739c0cf49b868cc8741.tar.gz
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 <mitchelh@codeaurora.org>
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r--subcmds/sync.py12
1 files changed, 9 insertions, 3 deletions
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.
189 p.add_option('--fetch-submodules', 189 p.add_option('--fetch-submodules',
190 dest='fetch_submodules', action='store_true', 190 dest='fetch_submodules', action='store_true',
191 help='fetch submodules from server') 191 help='fetch submodules from server')
192 p.add_option('--no-tags',
193 dest='no_tags', action='store_true',
194 help="don't fetch tags")
192 if show_smart: 195 if show_smart:
193 p.add_option('-s', '--smart-sync', 196 p.add_option('-s', '--smart-sync',
194 dest='smart_sync', action='store_true', 197 dest='smart_sync', action='store_true',
@@ -235,7 +238,8 @@ later is required to fix a server side protocol bug.
235 success = project.Sync_NetworkHalf( 238 success = project.Sync_NetworkHalf(
236 quiet=opt.quiet, 239 quiet=opt.quiet,
237 current_branch_only=opt.current_branch_only, 240 current_branch_only=opt.current_branch_only,
238 clone_bundle=not opt.no_clone_bundle) 241 clone_bundle=not opt.no_clone_bundle,
242 no_tags=opt.no_tags)
239 self._fetch_times.Set(project, time.time() - start) 243 self._fetch_times.Set(project, time.time() - start)
240 244
241 # Lock around all the rest of the code, since printing, updating a set 245 # 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.
273 if project.Sync_NetworkHalf( 277 if project.Sync_NetworkHalf(
274 quiet=opt.quiet, 278 quiet=opt.quiet,
275 current_branch_only=opt.current_branch_only, 279 current_branch_only=opt.current_branch_only,
276 clone_bundle=not opt.no_clone_bundle): 280 clone_bundle=not opt.no_clone_bundle,
281 no_tags=opt.no_tags):
277 fetched.add(project.gitdir) 282 fetched.add(project.gitdir)
278 else: 283 else:
279 print('error: Cannot fetch %s' % project.name, file=sys.stderr) 284 print('error: Cannot fetch %s' % project.name, file=sys.stderr)
@@ -558,7 +563,8 @@ later is required to fix a server side protocol bug.
558 563
559 if not opt.local_only: 564 if not opt.local_only:
560 mp.Sync_NetworkHalf(quiet=opt.quiet, 565 mp.Sync_NetworkHalf(quiet=opt.quiet,
561 current_branch_only=opt.current_branch_only) 566 current_branch_only=opt.current_branch_only,
567 no_tags=opt.no_tags)
562 568
563 if mp.HasChanges: 569 if mp.HasChanges:
564 syncbuf = SyncBuffer(mp.config) 570 syncbuf = SyncBuffer(mp.config)