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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> 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);
>> +				    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).



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]