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

Unified Diff: git_cache.py

Issue 1179593002: Revert of Specify GIT_DIR when running git-config in a mirror. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cache.py
diff --git a/git_cache.py b/git_cache.py
index 9e3eaec9fd2a67a3d0988954da03a6fd6200c94f..e80923cdbb074a0c27355bd51041341fd473ed27 100755
--- a/git_cache.py
+++ b/git_cache.py
@@ -219,26 +219,23 @@
def config(self, cwd=None):
if cwd is None:
cwd = self.mirror_path
- env = os.environ.copy()
- env['GIT_DIR'] = cwd
# Don't run git-gc in a daemon. Bad things can happen if it gets killed.
- self.RunGit(['config', 'gc.autodetach', '0'], cwd=cwd, env=env)
+ self.RunGit(['config', 'gc.autodetach', '0'], cwd=cwd)
# Don't combine pack files into one big pack file. It's really slow for
# repositories, and there's no way to track progress and make sure it's
# not stuck.
- self.RunGit(['config', 'gc.autopacklimit', '0'], cwd=cwd, env=env)
+ self.RunGit(['config', 'gc.autopacklimit', '0'], cwd=cwd)
# Allocate more RAM for cache-ing delta chains, for better performance
# of "Resolving deltas".
self.RunGit(['config', 'core.deltaBaseCacheLimit',
- gclient_utils.DefaultDeltaBaseCacheLimit()], cwd=cwd, env=env)
-
- self.RunGit(['config', 'remote.origin.url', self.url], cwd=cwd, env=env)
+ gclient_utils.DefaultDeltaBaseCacheLimit()], cwd=cwd)
+
+ self.RunGit(['config', 'remote.origin.url', self.url], cwd=cwd)
self.RunGit(['config', '--replace-all', 'remote.origin.fetch',
- '+refs/heads/*:refs/heads/*', r'\+refs/heads/\*:.*'],
- cwd=cwd, env=env)
+ '+refs/heads/*:refs/heads/*', r'\+refs/heads/\*:.*'], cwd=cwd)
for ref in self.refs:
ref = ref.lstrip('+').rstrip('/')
if ref.startswith('refs/'):
@@ -249,7 +246,7 @@
regex = r'\+refs/heads/%s:.*' % ref.replace('*', r'\*')
self.RunGit(
['config', '--replace-all', 'remote.origin.fetch', refspec, regex],
- cwd=cwd, env=env)
+ cwd=cwd)
def bootstrap_repo(self, directory):
"""Bootstrap the repo from Google Stroage if possible.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698