Re: Re : 2 questions on git-send-email usage

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Re : 2 questions on git-send-email usage

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:33

Linus Torvalds [off-list ref] writes:
Yes. However, I think the sign-off detection is a bit broken (quite 
independently of your patch).

A number of people end up capitalizing the sign-off differently, so you 
have lines like "Signed-Off-By: Xy Zzy [off-list ref]".

Also, at least for the kernel, we often have alternative formats, like

	Acked-by: Elliot Xavier Ample [off-list ref]

and for that case, adding the extra newline is actually bad.

So I would suggest a totally different approach: instead of using 
"strstr(comments, signed_off_by)", it would probably be much better to 
just look for the last non-empty line, and see if it matches the format

	"^[nonspace]*: .*@.*$"
Documentation/SubmittingPatches (the kernel one) does not show
the ugly Camel-Case-With-Hyphen spelling, and I've been wondring
why people do that.  A hidden agenda by me was to migrate people
away from that practice, but that is an independent issue ;-).

I like your "detect lines that looks like a RFC2822 header that
has some e-mail address" approach quite a lot.

Re: Re : 2 questions on git-send-email usage

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:33


On Wed, 12 Jul 2006, Junio C Hamano wrote:
Linus Torvalds [off-list ref] writes:
quoted
A number of people end up capitalizing the sign-off differently, so you 
have lines like "Signed-Off-By: Xy Zzy [off-list ref]".
Documentation/SubmittingPatches (the kernel one) does not show
the ugly Camel-Case-With-Hyphen spelling, and I've been wondring
why people do that.
Yeah, I actually try to edit it to the "proper" format when I notice it 
(which is not most of the time, but it's pretty rare to begin with).

More commonly, people mistype their own email addresses, and 
_occasionally_ just mis-type the whole Signed-off-by: line (we've got a 
few semi-colons instead of colons in the kernel, for example, and some 
lines that are missing the final '>' in the email etc.

So being somewhat forgiving might help, but I think another thing that 
migth help is a flag to "git-am" to _not_ apply a patch that lacks a 
previous sign-off.

I, for example, don't use the --signoff flag, partly because I want to 
make sure that I sign of only on patches that already have a sign-off from 
the previous person when it comes as email (or I add the sign-off only 
after looking at the patch closely). But if there was a 
"--error-on-no-signoff" flag, I could use it.

			Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help