Re: More builtin git-am issues..
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 23:06:27
On Fri, Sep 4, 2015 at 5:54 PM, Junio C Hamano [off-list ref] wrote:
How about a bit looser rule like this?
A block of text at the end of the message, each and every
line in which must match "^[^: ]+:[ ]" (that is,
a "keyword" that does not contain a whitespace nor a colon,
followed by a colon and whitespace, and arbitrary value thru
the end of line) is a signature block.
No. That's still broken.
The thing is, and that was what the report was all about, not every
line _is_ of that format. We have commetns from the sign-off people.
Things like this:
Signed-off-by: Noam Camus [off-list ref]
Acked-by: Vineet Gupta [off-list ref]
[ Also removed pointless cast from "void *". - Linus ]
Signed-off-by: Linus Torvalds [off-list ref]
or
Signed-off-by: Andi Kleen [off-list ref]
[ Updated comments and changelog a bit. ]
Signed-off-by: Peter Zijlstra (Intel) [off-list ref]
Link: http://lkml.kernel.org/r/1424225886-18652-3-git-send-email-andi@firstfloor.org
Signed-off-by: Ingo Molnar [off-list ref]
so no, it is simply not true that "every line must match".
I'm not even seeing why you argue for that, since clearly having a
sign-off-line is actually a safer choice too. The "every line must
match" rule is bad, not just because it's not true like above, but
also because it can be true without it being a sign-off block.
For example, it's not at all unlikely that you have perfectly normal
comments that just list some subsystem and their changes. Which could
easily look like
Trivial fixes all over the tree
drm: fix whitespace
mm: speeling errors
kernel: indentation and codign style
The above looks like a perfectly sane commit log to me.
Do you seriously think that it makes for a better "sign-off block
test" than one that actually checks for "is there a sign-off line"?
I'd much rather have special cases like testing for specific keywords
or looking for things that look like emails, than make it about being
"every line has this very generic format".
Linus