From 8e095af012d01f45b69bb5ad7ec60b3253a86360 Mon Sep 17 00:00:00 2001 From: "hinoka@chromium.org" Date: Wed, 10 Jun 2015 19:19:07 +0000 Subject: [PATCH] Revert of Specify GIT_DIR when running git-config in a mirror. (patchset #4 id:60001 of https://codereview.chromium.org/1167193002/) Reason for revert: Potentially broke the NaCl toolchain builders: crbug.com/498942 Speculative revert. Original issue's description: > Specify GIT_DIR when running git-config in a mirror. > > BUG=497894 > R=hinoka@chromium.org,agable@chromium.org > > Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=295587 TBR=agable@chromium.org,szager@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=497894 Review URL: https://codereview.chromium.org/1179593002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295607 0039d316-1c4b-4281-b951-d872f2087c98 --- git_cache.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/git_cache.py b/git_cache.py index 9e3eaec9f..e80923cdb 100755 --- a/git_cache.py +++ b/git_cache.py @@ -219,26 +219,23 @@ class Mirror(object): 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) + gclient_utils.DefaultDeltaBaseCacheLimit()], cwd=cwd) - self.RunGit(['config', 'remote.origin.url', self.url], cwd=cwd, env=env) + 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 @@ class Mirror(object): 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.