git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 28, 2016, 17:35 UTC
Message-ID
<xmqqfuu563gg.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160428144710.GD25364@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
>> +		 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);
>> +				    break;
>> +			   }
>
> This loop puzzled me for a bit. When we end early due to a newline, we
> subtract out the width here. I guess that's to accomodate the "i +=
> width" that the outer for-loop is going to do.

I think I essentially said the same thing on the previous round and I thought I suggested to restructure the loop to primarily aim to split at line-end (instead of the above which primarily aims to split at width but line-end may cause a premature split).

Previous: Jeff KingNext: Stefan Beller
Message 4 of 10 in “[PATCHv4 0/2] Implement the GIT_TRACE_CURL environment variable”
  1. Elia PintoApr 28, 2016
  2. 1/2 http.c: implement the GIT_TRACE_CURL environment variableElia Pinto, Apr 28, 2016
  3. Jeff KingApr 28, 2016
  4. Junio C HamanoApr 28, 2016
  5. Stefan BellerApr 28, 2016
  6. Jeff KingApr 28, 2016
  7. Stefan BellerApr 28, 2016
  8. Jeff KingApr 28, 2016
  9. 2/2 imap-send.c: introduce the GIT_TRACE_CURL enviroment variableElia Pinto, Apr 28, 2016
  10. Jeff KingApr 28, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.