Index: gclient_scm.py |
diff --git a/gclient_scm.py b/gclient_scm.py |
index e0a90912e7488082dd324fed7e4d8b50fc8ec8e2..79a0adf8f6b760bb4abf6379787b381f9df46c34 100644 |
--- a/gclient_scm.py |
+++ b/gclient_scm.py |
@@ -732,9 +732,14 @@ class GitWrapper(SCMWrapper): |
""" |
if not self.cache_dir: |
return url |
- mirror_kwargs = { 'print_func': self.filter } |
+ mirror_kwargs = { |
+ 'print_func': self.filter, |
+ 'refs': [] |
+ } |
if url == CHROMIUM_SRC_URL or url + '.git' == CHROMIUM_SRC_URL: |
- mirror_kwargs['refs'] = ['refs/tags/lkgr', 'refs/tags/lkcr'] |
+ mirror_kwargs['refs'].extend(['refs/tags/lkgr', 'refs/tags/lkcr']) |
+ 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) |
mirror.unlock() |