From: Joe Perches Date: Fri, 13 Feb 2015 22:38:41 +0000 (-0800) Subject: checkpatch: add ability to coalesce commit descriptions on multiple lines X-Git-Tag: v4.0-rc1~90^2~50 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=b671fde0572af42495ce3183969b0cafa98fd9ec;p=linux.git checkpatch: add ability to coalesce commit descriptions on multiple lines If a git commit description is split on consecutive lines, coalesce it before testing. This allows: commit ("some long description") Signed-off-by: Joe Perches Reported-by: Paul Bolle Tested-by: Paul Bolle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 41223c946808..6a3baa0bdde8 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,