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

Re: [PATCH v3] interpret-trailers: handle message without trailing newline

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 9, 2024, 15:58 UTC
Message-ID
<xmqqmskgu8dw.fsf@gitster.g>
In-Reply-To
<5f804f35-a69c-454e-a505-4ceeb9859387@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
> I assume it means invalid in the sense that the trailers are not
> separated from the rest of the message by a blank line, not in the
> sense that the resulting commit object is invalid.

OK, then "invalid message" -> "message with invalid trailer lines", perhaps.

Show 11 quoted lines
>> But of course, various tools to manipulate the messages (e.g.
>> "commit --amend" and your editor that gets invoked by it,
>> "interpret-trailers") may not be prepared to see any arbitrary
>> bytes.  I would have written
>>      While a commit message can contain arbitrary byte sequence, the
>>      fact that the user invoked the interpret-trailers command on it
>>      means that the contents is expected to be a proper text, which
>>      should not end in an incomplete line.  Instead of detecting and
>>      erroring out upon seeing such a log message, complete the last
>>      line if it lacks the terminating LF.
>> or something like that, if I were working on this change.
Thanks.
Previous: Phillip WoodNext: Phillip Wood
Message 9 of 10 in “interpret-trailers: handle message without trailing newline”
  1. interpret-trailers: handle message without trailing newlineBrian Lyles, Sep 5, 2024
  2. Brian LylesSep 5, 2024
  3. interpret-trailers: handle message without trailing newlineBrian Lyles, Sep 6, 2024
  4. Phillip WoodSep 6, 2024
  5. Junio C HamanoSep 6, 2024
  6. interpret-trailers: handle message without trailing newlineBrian Lyles, Sep 6, 2024
  7. Junio C HamanoSep 6, 2024
  8. Phillip WoodSep 9, 2024
  9. Junio C HamanoSep 9, 2024
  10. Phillip WoodSep 9, 2024

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.