diff --git a/git_cache.py b/git_cache.py index 02a09beaa..772dbea12 100755 --- a/git_cache.py +++ b/git_cache.py @@ -552,6 +552,14 @@ class Mirror(object): spec = spec.decode() try: self.print('Fetching %s' % spec) + env = os.environ.copy() + env.update({ + 'GIT_TRACE_PACKET': '1', + 'GIT_TR2_EVENT': '1', + 'GIT_TRACE2_EVENT': '1', + 'GIT_TRACE_CURL': '1', + 'GIT_TRACE_CURL_NO_DATA': '1' + }) # Only print first 30000 packets. We can use nonlocal keyword once we # switch to python 3. packet_count = [0] @@ -570,6 +578,7 @@ class Mirror(object): fetch_cmd + [spec], cwd=rundir, retry=True, + env=env, filter_fn=FilterPacket) except subprocess.CalledProcessError: if spec == '+refs/heads/*:refs/heads/*': diff --git a/recipes/recipe_modules/bot_update/resources/bot_update.py b/recipes/recipe_modules/bot_update/resources/bot_update.py index 32ae948fe..b1d1fb854 100755 --- a/recipes/recipe_modules/bot_update/resources/bot_update.py +++ b/recipes/recipe_modules/bot_update/resources/bot_update.py @@ -666,11 +666,6 @@ def _git_checkout(sln, sln_dir, revisions, refs, git_cache_dir, cleanup_dir): env = { 'GIT_TRACE': 'true', 'GIT_TRACE_PERFORMANCE': 'true', - 'GIT_TRACE_PACKET': '1', - 'GIT_TRACE2_EVENT': '1', - 'GIT_TRACE_CURL': '1', - 'GIT_TRACE_CURL_NO_DATA': '1', - 'INFRA_GIT_WRAPPER_TRACE': '1', } # Step 1: populate/refresh cache, if necessary. @@ -728,11 +723,11 @@ def _git_checkout(sln, sln_dir, revisions, refs, git_cache_dir, cleanup_dir): else: _git_disable_gc(sln_dir) git('remote', 'set-url', 'origin', mirror_dir, cwd=sln_dir) - git('fetch', 'origin', cwd=sln_dir, env=env) + git('fetch', 'origin', cwd=sln_dir) git('remote', 'set-url', '--push', 'origin', url, cwd=sln_dir) for ref in refs: refspec = '%s:%s' % (ref, ref.lstrip('+')) - git('fetch', 'origin', refspec, cwd=sln_dir, env=env) + git('fetch', 'origin', refspec, cwd=sln_dir) # Windows sometimes has trouble deleting files. # This can make git commands that rely on locks fail.