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>
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -2198,6 +2198,13 @@ sub process { · 2197 unmodified lines | ||
| 2198 | 2198 | defined $rawlines[$linenr] && |
| 2199 | 2199 | $rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) { |
| 2200 | 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 | 2210 | ($id, $description) = git_commit_info($orig_commit, |