Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(905)

Unified Diff: gclient_scm.py

Issue 278043005: Pass shallow flag through gclient to git_cache.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gclient.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index 00b8145bb4adde03ddd33a16b0b5bb3836aff7bf..594515dc16879c9014cd007a11754b6f86f6028e 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -765,7 +765,15 @@ class GitWrapper(SCMWrapper):
if hasattr(options, 'with_branch_heads') and options.with_branch_heads:
mirror_kwargs['refs'].append('refs/branch-heads/*')
mirror = git_cache.Mirror(url, **mirror_kwargs)
- mirror.populate(verbose=options.verbose, bootstrap=True)
+ if options.shallow:
+ # HACK(hinoka): These repositories should be super shallow.
+ if 'flash' in url:
+ depth = 10
+ else:
+ depth = 10000
+ else:
+ depth = None
+ mirror.populate(verbose=options.verbose, bootstrap=True, depth=depth)
mirror.unlock()
return mirror.mirror_path if mirror.exists() else None
« no previous file with comments | « gclient.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698