From 0d3c6072f5b99d55029dcd7b0f156709c6b2e7df Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 24 Sep 2018 13:54:46 +0200 Subject: [PATCH] contrib/checkpatch: remove the first character off a diff Otherwise the leading whitespace checks won't work on patches. --- contrib/scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/scripts/checkpatch.pl b/contrib/scripts/checkpatch.pl index 289dad82e9..d6b3c4451a 100755 --- a/contrib/scripts/checkpatch.pl +++ b/contrib/scripts/checkpatch.pl @@ -93,7 +93,7 @@ if ($is_patch) { new_file ($2); next; } - /^([ \+])(.*)/ or next; + s/^([ \+])(.*)/$2/ or next; $line_no++; $check_line = $1 eq '+'; $line = $2;