From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: Brian Lyles <brianmlyles@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH v3] interpret-trailers: handle message without trailing newline
Date: Mon, 09 Sep 2024 08:58:03 -0700 [thread overview]
Message-ID: <xmqqmskgu8dw.fsf@gitster.g> (raw)
In-Reply-To: <5f804f35-a69c-454e-a505-4ceeb9859387@gmail.com> (Phillip Wood's message of "Mon, 9 Sep 2024 10:13:41 +0100")
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.
>> 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.
next prev parent reply other threads:[~2024-09-09 15:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 17:34 [PATCH] interpret-trailers: handle message without trailing newline Brian Lyles
2024-09-05 18:24 ` Brian Lyles
2024-09-06 4:08 ` [PATCH v2] " Brian Lyles
2024-09-06 9:07 ` Phillip Wood
2024-09-06 15:23 ` Junio C Hamano
2024-09-06 14:50 ` [PATCH v3] " Brian Lyles
2024-09-06 16:21 ` Junio C Hamano
2024-09-09 9:13 ` Phillip Wood
2024-09-09 15:58 ` Junio C Hamano [this message]
2024-09-09 9:13 ` Phillip Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqmskgu8dw.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=brianmlyles@gmail.com \
--cc=git@vger.kernel.org \
--cc=phillip.wood123@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).