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

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 10:48:38AM -0700, Stefan Beller wrote: > >> How does it overwrite the GIT_CURL_VERBOSE variable? > > > > You can't use both, as they are both triggered using the CURLOPT_VERBOSE > > option of curl. The main difference is that with GIT_CURL_VERBOSE, we > > rely on curl to pr

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

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 10:44 AM, Jeff King wrote: > On Thu, Apr 28, 2016 at 10:26:06AM -0700, Stefan Beller wrote: > >> > +'GIT_TRACE_CURL':: >> > + Enables a curl full trace dump of all incoming and outgoing data, >> > + including descriptive information, of the git transport protoco

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

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 10:26:06AM -0700, Stefan Beller wrote: > > +'GIT_TRACE_CURL':: > > + Enables a curl full trace dump of all incoming and outgoing data, > > + including descriptive information, of the git transport protocol. > > + This is similar to doing curl --trace-ascii

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

2016-04-28 Thread Junio C Hamano
Jeff King writes: >> + for (w = 0; (w < width) && (i + w < size); w++) { >> + if (nohex && (i + w + 1 < size) && ptr[i + w] == '\r' >> +&& ptr[i + w + 1] == '\n') { >> +i += (w + 2 - width); >> +

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

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 4:57 AM, Elia Pinto wrote: > 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 r

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

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 11:57:47AM +, Elia Pinto wrote: > +static void curl_dump(const char *text, unsigned char *ptr, size_t size, > char nohex, char nopriv) We usually use "int" for our boolean flags. Space savings don't matter outside of a struct (and if they did, you should be using a si

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

2016-04-28 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