Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b671fde0 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

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: default avatarJoe Perches <joe@perches.com>
Reported-by: default avatarPaul Bolle <pebolle@tiscali.nl>
Tested-by: default avatarPaul Bolle <pebolle@tiscali.nl>

Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent acd9362c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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,