Thread (28 messages) 28 messages, 2 authors, 2016-06-15

Re: [PATCH v2 01/10] sequencer.c: remove broken support for rfc2822 continuation in footer

flat view

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:55:51

Brandon Casey wrote:
On Mon, Jan 21, 2013 at 11:54 PM, Jonathan Nieder [off-list ref] wrote:
quoted
quoted
-             if ((buf[k] == ' ' || buf[k] == '\t') && !first)
-                     continue;
This is always the first line examined, so this "continue" never
triggers.
This is just totally broken and always has been.  The index variable
should be 'i' not 'k'.
Yes, now I see.

This test trips when the *next* line starts with ' ' or '\t'.

	commit, cherry-pick -s: remove broken support for multiline rfc2822 fields

	Starting with c1e01b0c (commit: More generous accepting of RFC-2822
	footer lines, 2009-10-28), "git commit -s" carefully parses the last
	paragraph of each commit message to check if it consists only of
	RFC2822-style headers, in which case the signoff will be added as a
	new line in the same list:

		Reported-by: Reporter [off-list ref]
		Signed-off-by: Author [off-list ref]
		Acked-by: Lieutenant [off-list ref]

	It even included support for accepting indented continuation lines for
	multiline fields.  Unfortunately the multiline field support is broken
	because it checks whether buf[k] (the first character of the *next*
	line) instead of buf[i] is a whitespace character.  So for example, it
	confuses the following for a well-formed RFC2822 footer:

		Reported-by: Reporter [off-list ref]
		LINE NOISE
		 continuation
		 continuation

	A typical well-formed footer with multiline fields is not accepted:

		Reported-by: Re Porter
		 [off-list ref]
		Signed-off-by: Author [off-list ref]

	That this has remained broken for so long is a good sign that nobody
	actually needed continuation lines.  Rip out the broken continuation
	support.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help