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.