Re: [PATCHv5 1/2] http.c: implement the GIT_TRACE_CURL environment variable

2016-05-02 Thread Jeff King
On Mon, May 02, 2016 at 11:59:14AM -0700, Junio C Hamano wrote: > > +int curl_trace(CURL *handle, curl_infotype type, char *data, size_t size, > > void *userp) > > +{ > > + const char *text; > > + (void)handle; /* prevent compiler unused parameter warning if > > checked */ > > +

Re: [PATCHv5 1/2] http.c: implement the GIT_TRACE_CURL environment variable

2016-05-02 Thread Junio C Hamano
Elia Pinto writes: > +int curl_trace(CURL *handle, curl_infotype type, char *data, size_t size, > void *userp) > +{ > + const char *text; > + (void)handle; /* prevent compiler unused parameter warning if > checked */ > + (void)userp;/* prevent compiler unused p

Re: [PATCHv5 1/2] http.c: implement the GIT_TRACE_CURL environment variable

2016-05-02 Thread Junio C Hamano
Elia Pinto writes: > +static void curl_dump(const char *text, unsigned char *ptr, size_t size, int > nopriv) > +{ > + size_t i; > + struct strbuf out = STRBUF_INIT; > + unsigned int width = 80; > + > + strbuf_addf(&out, "%s, %10.10ld bytes (0x%8.8lx)\n", > + text, (lo

Re: [PATCHv5 1/2] http.c: implement the GIT_TRACE_CURL environment variable

2016-05-02 Thread Jeff King
On Mon, May 02, 2016 at 02:28:12PM +, Elia Pinto wrote: > + if (nopriv && > + (skip_prefix(out.buf + prefix_len, "Authorization:", > &header) > + || skip_prefix(out.buf + prefix_len, > "Proxy-Authorization:", &header))) { > +

Re: [PATCHv5 1/2] http.c: implement the GIT_TRACE_CURL environment variable

2016-05-02 Thread Ramsay Jones
On 02/05/16 15:28, Elia Pinto wrote: [snip] > diff --git a/http.h b/http.h > index 36f558b..cd186a4 100644 > --- a/http.h > +++ b/http.h > @@ -225,4 +225,8 @@ extern int finish_http_object_request(struct > http_object_request *freq); > extern void abort_http_object_request(struct http_object_

[PATCHv5 1/2] http.c: implement the GIT_TRACE_CURL environment variable

2016-05-02 Thread Elia Pinto
Implement the GIT_TRACE_CURL environment variable to allow a greater degree of detail of GIT_CURL_VERBOSE, in particular the complete transport header and all the data payload exchanged. It might be useful if a particular situation could require a more thorough debugging analysis. Document the new