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

Side by Side Diff: git_cache.py

Issue 202753003: Rationalize the git config settings for index-pack performance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: comment Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« gclient_utils.py ('K') | « gclient_utils.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """A git command for managing a local cache of git repositories.""" 6 """A git command for managing a local cache of git repositories."""
7 7
8 import errno 8 import errno
9 import logging 9 import logging
10 import optparse 10 import optparse
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 filter_fn = lambda l: '[up to date]' not in l 174 filter_fn = lambda l: '[up to date]' not in l
175 if options.verbose: 175 if options.verbose:
176 v = ['-v', '--progress'] 176 v = ['-v', '--progress']
177 filter_fn = None 177 filter_fn = None
178 178
179 d = [] 179 d = []
180 if options.depth: 180 if options.depth:
181 d = ['--depth', '%d' % options.depth] 181 d = ['--depth', '%d' % options.depth]
182 182
183 def _config(directory): 183 def _config(directory):
184 RunGit(['config', 'core.deltaBaseCacheLimit', '2g'], 184 RunGit(['config', 'core.deltaBaseCacheLimit',
185 cwd=directory) 185 gclient_utils.DefaultDeltaBaseCacheLimit()], cwd=directory)
186 RunGit(['config', 'remote.origin.url', url], 186 RunGit(['config', 'remote.origin.url', url],
187 cwd=directory) 187 cwd=directory)
188 RunGit(['config', '--replace-all', 'remote.origin.fetch', 188 RunGit(['config', '--replace-all', 'remote.origin.fetch',
189 '+refs/heads/*:refs/heads/*'], 189 '+refs/heads/*:refs/heads/*'],
190 cwd=directory) 190 cwd=directory)
191 RunGit(['config', '--add', 'remote.origin.fetch', 191 RunGit(['config', '--add', 'remote.origin.fetch',
192 '+refs/tags/*:refs/tags/*'], 192 '+refs/tags/*:refs/tags/*'],
193 cwd=directory) 193 cwd=directory)
194 for ref in options.ref or []: 194 for ref in options.ref or []:
195 ref = ref.rstrip('/') 195 ref = ref.rstrip('/')
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 return options, args 305 return options, args
306 306
307 307
308 def main(argv): 308 def main(argv):
309 dispatcher = subcommand.CommandDispatcher(__name__) 309 dispatcher = subcommand.CommandDispatcher(__name__)
310 return dispatcher.execute(OptionParser(), argv) 310 return dispatcher.execute(OptionParser(), argv)
311 311
312 312
313 if __name__ == '__main__': 313 if __name__ == '__main__':
314 sys.exit(main(sys.argv[1:])) 314 sys.exit(main(sys.argv[1:]))
OLDNEW
« gclient_utils.py ('K') | « gclient_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698