Skip to content

Commit

Permalink
imap-send.c: support GIT_CURL_VERBOSE
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kyle J. McKay authored and Junio C Hamano committed Jan 6, 2015
1 parent 1e16b25 commit d47e55d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imap-send.c
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,7 @@ static CURL *setup_curl(struct imap_server_conf *srvc)

curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);

if (0 < verbosity)
if (0 < verbosity || getenv("GIT_CURL_VERBOSE"))
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);

return curl;
Expand Down

0 comments on commit d47e55d

Please sign in to comment.