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

Re: [PATCH 2/2] merge: make sure to terminate message with newline

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 16, 2021, 22:13 UTC
Message-ID
<xmqqo8b1q547.fsf@gitster.g>
In-Reply-To
<YPH1qKMPOqhCzp4Y@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> which would cover that case. But Phillip mentioned that our own
> fmt_merge_msg() does not include a newline. So it would not be the user
> feeding us an incomplete line, but rather Git feeding it.
>
> And that was
> what I suggested should be corrected (which I suppose would be in
> addition to correcting lines from the user).
>
> However, I see a call to strbuf_complete_line() at the end of
> fmt_merge_msg(), so I am puzzled about what he meant.

Whew. You got me worried. Yeah, if fmt_merge_msg() is not terminating its output, we should fix that, but I do not see such a breakage in the current code, either.

Thanks.
Previous: Jeff KingNext: Phillip Wood
Message 11 of 17 in “Normalize newlines in merge & interpret-trailer”
  1. 0/2 Normalize newlines in merge & interpret-trailerLuca Weiss via GitGitGadget, Jul 16, 2021
  2. 1/2 trailer: handle input without trailing newlineLuca Weiss via GitGitGadget, Jul 16, 2021
  3. Jeff KingJul 16, 2021
  4. 2/2 merge: make sure to terminate message with newlineLuca Weiss via GitGitGadget, Jul 16, 2021
  5. Phillip WoodJul 16, 2021
  6. Luca WeissJul 16, 2021
  7. Phillip WoodJul 16, 2021
  8. Jeff KingJul 16, 2021
  9. Junio C HamanoJul 16, 2021
  10. Jeff KingJul 16, 2021
  11. Junio C HamanoJul 16, 2021
  12. Phillip WoodJul 17, 2021
  13. Jeff KingJul 17, 2021
  14. Luca WeissJul 21, 2021
  15. Luca WeissAug 26, 2021
  16. Junio C HamanoJul 16, 2021
  17. Junio C HamanoJul 16, 2021

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.