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>
This commit is contained in:
parent
acd9362c24
commit
b671fde057
@ -2198,6 +2198,13 @@ sub process {
|
|||||||
defined $rawlines[$linenr] &&
|
defined $rawlines[$linenr] &&
|
||||||
$rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) {
|
$rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) {
|
||||||
$orig_desc = $1;
|
$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,
|
($id, $description) = git_commit_info($orig_commit,
|
||||||
|
Loading…
Reference in New Issue
Block a user