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

Commit 0a416b51 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "checkpatch: Handle quotes within commit reference descriptions"

parents d3e347cf 508a6c80
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -2986,20 +2986,20 @@ sub process {
			$long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i);
			$space = 0 if ($line =~ /\bcommit [0-9a-f]/i);
			$case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/);
			if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) {
			if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("(.+)(?="\))/i) {
				$orig_desc = $1;
				$hasparens = 1;
			} elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i &&
				 defined $rawlines[$linenr] &&
				 $rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) {
				 $rawlines[$linenr] =~ /^\s*\("(.+)(?="\))/) {
				$orig_desc = $1;
				$hasparens = 1;
			} elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
			} 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;
				 $rawlines[$linenr] =~ /^\s*.+(?<="\))/) {
				$line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("(.+)$/i;
				$orig_desc = $1;
				$rawlines[$linenr] =~ /^\s*([^"]+)"\)/;
				$rawlines[$linenr] =~ /^\s*(.+)(?="\))/;
				$orig_desc .= " " . $1;
				$hasparens = 1;
			}