Message ID | 1421792716.2724.11.camel@perches.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Joe, Andrew, On Tue, 2015-01-20 at 14:25 -0800, Joe Perches wrote: > If a git commit description is split on consecutive lines, > coalesce it before testing. > > This allows: > > commit <foo> ("some long > description") > > Signed-off-by: Joe Perches <joe@perches.com> > Noticed-by: Paul Bolle <pebolle@tiscali.nl> Works as advertised (ie, that particular commit explanation doesn't trigger an error anymore). And Andrew M. already added it to the -mm tree. Thanks, both of you! Paul Bolle
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 41223c9..6a3baa0 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2198,6 +2198,13 @@ sub process { defined $rawlines[$linenr] && $rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) { $orig_desc = $1; + } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i && + defined $rawlines[$linenr] && + $rawlines[$linenr] =~ /^\s*[^"]+"\)/) { + $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i; + $orig_desc = $1; + $rawlines[$linenr] =~ /^\s*([^"]+)"\)/; + $orig_desc .= " " . $1; } ($id, $description) = git_commit_info($orig_commit,