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 |