From: Junio C Hamano Date: Mon, 09 Sep 2024 15:58:03 GMT Subject: Re: [PATCH v3] interpret-trailers: handle message without trailing newline Message-ID: In-Reply-To: <5f804f35-a69c-454e-a505-4ceeb9859387@gmail.com> Phillip Wood 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. >> 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.