Thread (3 messages) flat view 3 messages, 3 authors, 2021-03-25

Re: Bug Report: Multi-line trailers containing empty lines break parsing

From: Junio C Hamano <hidden>
Date: 2021-03-23 17:40:21

Christian Couder [off-list ref] writes:
So I thought that blank lines should not appear in the trailers. And
if any appears, it means that the trailers should start after the last
blank line.
I think that is a good principle to stick to.
quoted
quoted
 - if the second "multi:" trailer did not have the funny blank line
   before "_two", the expected output would still be "multi:"
   followed by "one two three", iow, the line after the second
   "multi: one" is a total no-op?  If we added many more " \n" lines
   there, they are all absorbed and ignored?  It somehow feels wrong
That's definitely the outcome of this patch, but I agree it feels wrong.
I'm not sure that we define the behavior that strictly in
git-interpret-trailers(1), so we have some wiggle room, I guess.
Any patch to relax how blank lines and other aspects of trailers
parsing in my opinion should come with some documentation change to
explain what we now accept and what we don't accept, and also tests to
enforce that.
OK.  But do we document clearly what we accept and we don't before
any change?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help