[PATCH] FIXUP checkpatch: improve patch recognition

From: Gwendal Grignou
Date: Wed May 30 2018 - 12:52:05 EST


Fix syntax error in patch.

Signed-off-by: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index f1fecd8aa4d7..03dd7b6b0eab 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2378,7 +2378,7 @@ sub process {
# check if it's a mode change, rename or start of a patch
if (!$in_commit_log &&
($line =~ /^ mode change [0-7]+ => [0-7]+ \S+\s*$/ ||
- ($line =~ /^rename (?:from|to) \S+\s*$/ ||
+ $line =~ /^rename (?:from|to) \S+\s*$/ ||
$line =~ /^diff --git a\/[\w\/\.\_\-]+ b\/\S+\s*$/)) {
$is_patch = 1;
}
--
2.17.0.921.gf22659ad46-goog