aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2015-02-13 17:38:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-14 00:21:39 -0500
commitb671fde0572af42495ce3183969b0cafa98fd9ec (patch)
treedf49b0fb6af3ca3413b36a28e1ce2ddebf2c3aa2 /scripts/checkpatch.pl
parentacd9362c248e33187629c950badb834b73e20e41 (diff)
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 <foo> ("some long description") Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Paul Bolle <pebolle@tiscali.nl> Tested-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl7
1 files changed, 7 insertions, 0 deletions
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 {
2198 defined $rawlines[$linenr] && 2198 defined $rawlines[$linenr] &&
2199 $rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) { 2199 $rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) {
2200 $orig_desc = $1; 2200 $orig_desc = $1;
2201 } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
2202 defined $rawlines[$linenr] &&
2203 $rawlines[$linenr] =~ /^\s*[^"]+"\)/) {
2204 $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i;
2205 $orig_desc = $1;
2206 $rawlines[$linenr] =~ /^\s*([^"]+)"\)/;
2207 $orig_desc .= " " . $1;
2201 } 2208 }
2202 2209
2203 ($id, $description) = git_commit_info($orig_commit, 2210 ($id, $description) = git_commit_info($orig_commit,