Re: [PATCH v2] trailer: allow spaces in tokens
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 18, 2022, 16:54 UTC
- Message-ID
- <xmqqk075qyq0.fsf@gitster.g>
- In-Reply-To
- <pull.1309.v2.git.git.1660809243298.gitgitgadget@gmail.com>
"Max Bernstein via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 18 quoted lines
> Range-diff vs v1: > > 1: 404a6d1b193 ! 1: 4d490851ac2 trailer: allow spaces in tokens > @@ Commit message > > Signed-off-by: Max Bernstein <max@bernsteinbear.com> > > + ## t/t4014-format-patch.sh ## > +@@ t/t4014-format-patch.sh: test_expect_success 'signoff: not really a signoff' ' > + 4:Subject: [PATCH] subject > + 8: > + 9:I want to mention about Signed-off-by: here. > +- 10: > +- 11:Signed-off-by: C O Mitter <committer@example.com> > ++ 10:Signed-off-by: C O Mitter <committer@example.com> > + EOF > + test_cmp expect actual > + '
So, the updated code mistook the body of the message that is not a sign-off, because there is a colon on the line, the line does not begin with the colon, and everything before the colon is an alnum or a whitespace, so squashed the paragraph break before the real trailer block and the last line of the body and made it a body-less commit log message?
This might be a good demonstration of why it is a mistaken design to allow whitespaces, which may steer us toward fixing the documentation?
I dunno. What do others think?