diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2018-01-18 16:28:02 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-01-19 13:06:57 -0800 |
commit | 8ba18e6fa402666fe94a285cd27addd9b0df6462 (patch) | |
tree | 5fd4fae3cda3a10064f8cebd2cee85257270ac43 /t | |
parent | http: support cookie redaction when tracing (diff) | |
download | tgif-8ba18e6fa402666fe94a285cd27addd9b0df6462.tar.xz |
http: support omitting data from traces
GIT_TRACE_CURL provides a way to debug what is being sent and received
over HTTP, with automatic redaction of sensitive information. But it
also logs data transmissions, which significantly increases the log file
size, sometimes unnecessarily. Add an option "GIT_TRACE_CURL_NO_DATA" to
allow the user to omit such data transmissions.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t5551-http-fetch-smart.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh index 21a5ce8601..f5721b4a59 100755 --- a/t/t5551-http-fetch-smart.sh +++ b/t/t5551-http-fetch-smart.sh @@ -385,5 +385,17 @@ test_expect_success 'GIT_REDACT_COOKIES handles empty values' ' grep "Cookie:.*Foo=<redacted>" err ' +test_expect_success 'GIT_TRACE_CURL_NO_DATA prevents data from being traced' ' + rm -rf clone && + GIT_TRACE_CURL=true \ + git clone $HTTPD_URL/smart/repo.git clone 2>err && + grep "=> Send data" err && + + rm -rf clone && + GIT_TRACE_CURL=true GIT_TRACE_CURL_NO_DATA=1 \ + git clone $HTTPD_URL/smart/repo.git clone 2>err && + ! grep "=> Send data" err +' + stop_httpd test_done |