From: Jonathan Nieder Date: Tue, 22 Jan 2013 09:47:20 GMT Subject: Re: [PATCH v2 01/10] sequencer.c: remove broken support for rfc2822 continuation in footer Message-ID: <20130122094720.GA8908@elie.Belkin> In-Reply-To: Brandon Casey wrote: > On Mon, Jan 21, 2013 at 11:54 PM, Jonathan Nieder wrote: >> First (snipped), it seeks back two newlines from the end and then >> forward to the next non-newline character, so (buf + i) is at the >> start of the last line of (the interesting part of) sb. > > Did you catch that the two newlines have to be adjacent to each other? [...] Here is the loop in master: int hit = 0; [...] for (i = len - 1; i > 0; i--) { if (hit && buf[i] == '\n') break; hit = (buf[i] == '\n'); } I don't see any adjacency check. I agree with you that "two adjacent newlines" was probably the intent, though.