* [PATCH] imap-send.c: support GIT_CURL_VERBOSE
@ 2015-01-06 11:00 Kyle J. McKay
2015-01-06 20:17 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Kyle J. McKay @ 2015-01-06 11:00 UTC (permalink / raw)
To: Bernhard Reiter; +Cc: Git mailing list
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>
---
*** PATCH IS AGAINST NEXT ***
In particular, this patch requires br/imap-send-via-libcurl
imap-send.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/imap-send.c b/imap-send.c
index 4dfe4c25..060df834 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -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;
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] imap-send.c: support GIT_CURL_VERBOSE
2015-01-06 11:00 [PATCH] imap-send.c: support GIT_CURL_VERBOSE Kyle J. McKay
@ 2015-01-06 20:17 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2015-01-06 20:17 UTC (permalink / raw)
To: Kyle J. McKay; +Cc: Bernhard Reiter, Git mailing list
"Kyle J. McKay" <mackyle@gmail.com> writes:
> When using git-imap-send to send via cURL, support setting
> the GIT_CURL_VERBOSE environment variable to enable cURL's
> verbose mode.
> ...
> diff --git a/imap-send.c b/imap-send.c
> index 4dfe4c25..060df834 100644
> --- a/imap-send.c
> +++ b/imap-send.c
> @@ -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;
Makes sense; thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-06 20:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-06 11:00 [PATCH] imap-send.c: support GIT_CURL_VERBOSE Kyle J. McKay
2015-01-06 20:17 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).