Re: [PATCHv5 1/2] http.c: implement the GIT_TRACE_CURL environment variable
- From
Jeff King <peff@peff.net>
- Date
- May 2, 2016, 18:15 UTC
- Message-ID
- <20160502181533.GC8439@sigill.intra.peff.net>
- In-Reply-To
- <20160502142813.50868-2-gitter.spiros@gmail.com>
On Mon, May 02, 2016 at 02:28:12PM +0000, Elia Pinto wrote:
Show 7 quoted lines
> + if (nopriv &&
> + (skip_prefix(out.buf + prefix_len, "Authorization:", &header)
> + || skip_prefix(out.buf + prefix_len, "Proxy-Authorization:", &header))) {
> + /* The first token is the type, which is OK to log */
> + while (isspace(*header))
> + header++;
> + /* Everything else is opaque and possibly sensitive */The first comment there is now misleading, as we _don't_ keep the first token (though as mentioned elsewhere, I think we should).
> +void setup_curl_trace(CURL *handle)
> +{
> + if (!trace_want(&trace_curl)) return;Style: we always put conditional bodies on a new line, even when they are trivial like this.
-Peff