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

Re: Bug in "git am" when the body starts with spaces

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Apr 1, 2017, 00:52 UTC
Message-ID
<CA+55aFwcQuxwhQ+LABmev2XRHgOqsbRm7YDYn3FDDXKMYcF-CA@mail.gmail.com>
In-Reply-To
<CA+55aFypmFkc4gOEea-AF1kKYb3K=6nosXvYS4AMGFOQHw0ZxA@mail.gmail.com>

Ok, did a bisect, and this bisects to commit 6b4b013f1884 ("mailinfo: handle in-body header continuations").

The continuation logic is oddly complex, and I can't follow the logic. But it is completely broken in how it thinks empty lines are somehow "continuations".

Jonathan?
                     Linus

On Fri, Mar 31, 2017 at 5:24 PM, Linus Torvalds <torvalds@linux-foundation.org> wrote:

Show 12 quoted lines
>
> I think the reason is that the "header continuation line" logic kicks
> in because the lines in the body start with spaces, but that's
> entirely incorrect, since
>
>  (a) we're not in an email header
>
>  (b) there's an empty line in between anyway, so no way are those body
> lines continuation lines.
>
> I didn't check how far back this goes, I guess I'll do that next. But
> I thought I'd report it here first in case somebody else goes "ahhh".
Previous: Linus TorvaldsNext: Jeff King
Message 2 of 8 in “Bug in "git am" when the body starts with spaces”
  1. Linus TorvaldsApr 1, 2017
  2. Linus TorvaldsApr 1, 2017
  3. Jeff KingApr 1, 2017
  4. Linus TorvaldsApr 1, 2017
  5. Jeff KingApr 2, 2017
  6. Jonathan TanApr 3, 2017
  7. Jeff KingApr 4, 2017
  8. Junio C HamanoApr 2, 2017

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.