diff options
| -rwxr-xr-x | scripts/checkpatch.pl | 5 | ||||
| -rw-r--r-- | scripts/pre-commit | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b954de58304..fa96678f00a 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3675,6 +3675,11 @@ sub process { exit(0); } + # Skip if it's an empty patch + if ($chk_patch && !$is_patch && !$realline) { + exit(0); + } + if (!$is_patch) { ERROR("NOT_UNIFIED_DIFF", "Does not appear to be a unified-diff format patch\n"); diff --git a/scripts/pre-commit b/scripts/pre-commit index 104908fa5c9..5e9fe36146d 100644 --- a/scripts/pre-commit +++ b/scripts/pre-commit @@ -17,4 +17,4 @@ else # NEEDSWORK: we should produce a diff with an empty tree here # if we want to do the same verification for the initial import. : -fi | scripts/checkpatch.pl --no-signoff --strict - +fi | scripts/checkpatch.pl --no-signoff --strict --ignore SPLIT_STRING - |