From 9779b146cdfec9abb6bb7ad1a7e8d21916a3dfd1 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Wed, 29 May 2019 23:19:29 +0000 Subject: [PATCH] git-cl: Use modern environment variable name to trigger tracing In git.git commit e4b75d6a1d31 (trace2: rename environment variables to GIT_TRACE2*, 2019-05-19), the GIT_TR2_EVENT environment variable is being renamed to GIT_TRACE2_EVENT. Set both environment variables so that Git versions with and without that change will both write traces to the tr2-event file. The trace2 facility was introduced in Git 2.22.0. rc0 and rc1 use the more cryptic GIT_TR2* name; rc2 and later (and in particular Git 2.22.0 final) will only support GIT_TRACE2*. In a week or so, once this change finishes rolling out to the Googler population, we can simplify "git cl" by only using the modern GIT_TRACE2_EVENT envvar and GIT_TR2* will be lost to history. Change-Id: Iade2ebfd4aff27270688d94514f5f35a4e34a29b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1636277 Reviewed-by: Edward Lesmes Commit-Queue: Jonathan Nieder --- git_cl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/git_cl.py b/git_cl.py index 5c858cebe..3b1a8dd78 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2599,6 +2599,7 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase): env = os.environ.copy() env['GIT_REDACT_COOKIES'] = 'o,SSO,GSSO_Uberproxy' env['GIT_TR2_EVENT'] = os.path.join(traces_dir, 'tr2-event') + env['GIT_TRACE2_EVENT'] = os.path.join(traces_dir, 'tr2-event') env['GIT_TRACE_CURL'] = os.path.join(traces_dir, 'trace-curl') env['GIT_TRACE_CURL_NO_DATA'] = '1' env['GIT_TRACE_PACKET'] = os.path.join(traces_dir, 'trace-packet')