imap-send.c: support GIT_CURL_VERBOSE
When using git-imap-send to send via cURL, support setting the GIT_CURL_VERBOSE environment variable to enable cURL's verbose mode. The existing http.c code already supports this and does it by simply checking to see whether or not the environment variable exists -- it does not examine the value at all. For consistency, enable CURLOPT_VERBOSE when GIT_CURL_VERBOSE is set by using the exact same test that http.c does. Signed-off-by: Kyle J. McKay <mackyle@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kyle J. McKay committed
Jan 6, 2015 at 03:00 UTC
d47e55da92932eecb58d01a7d925efa36f30087d
1 file changed
+1
-1
imap-send.c
+1
-1
@@ -1431,7 +1431,7 @@ static CURL *setup_curl(struct imap_server_conf *srvc)
1431
1432
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
1433
1434
- if (0 < verbosity)
1434
+ if (0 < verbosity || getenv("GIT_CURL_VERBOSE"))
1435
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
1436
1437
return curl;