Commit 9779b146 authored by Jonathan Nieder's avatar Jonathan Nieder Committed by Commit Bot

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/+/1636277Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Jonathan Nieder <jrn@google.com>
parent 77e19d35
......@@ -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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment