git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Elia Pinto <gitter.spiros@gmail.com>,
	git@vger.kernel.org, tboegi@web.de, ramsay@ramsayjones.plus.com,
	sunshine@sunshineco.com
Subject: Re: [PATCHv4 1/2] http.c: implement the GIT_TRACE_CURL environment variable
Date: Thu, 28 Apr 2016 10:35:59 -0700	[thread overview]
Message-ID: <xmqqfuu563gg.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160428144710.GD25364@sigill.intra.peff.net> (Jeff King's message of "Thu, 28 Apr 2016 10:47:10 -0400")

Jeff King <peff@peff.net> 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).

  reply	other threads:[~2016-04-28 17:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 11:57 [PATCHv4 0/2] Implement the GIT_TRACE_CURL environment variable Elia Pinto
2016-04-28 11:57 ` [PATCHv4 1/2] http.c: implement " Elia Pinto
2016-04-28 14:47   ` Jeff King
2016-04-28 17:35     ` Junio C Hamano [this message]
2016-04-28 17:26   ` Stefan Beller
2016-04-28 17:44     ` Jeff King
2016-04-28 17:48       ` Stefan Beller
2016-04-28 18:05         ` Jeff King
2016-04-28 11:57 ` [PATCHv4 2/2] imap-send.c: introduce the GIT_TRACE_CURL enviroment variable Elia Pinto
2016-04-28 14:55   ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqfuu563gg.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitter.spiros@gmail.com \
    --cc=peff@peff.net \
    --cc=ramsay@ramsayjones.plus.com \
    --cc=sunshine@sunshineco.com \
    --cc=tboegi@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).