checkpatch: avoid NOT_UNIFIED_DIFF errors on cover-letter.patch files
authorJoe Perches <joe@perches.com>
Thu, 25 Jun 2015 22:03:11 +0000 (15:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Jun 2015 00:00:42 +0000 (17:00 -0700)
Make an exception for the "Does not appear to be a unified-diff" error
when scanning what appears to be git generated cover letters.

Signed-off-by: Joe Perches <joe@perches.com>
Suggested-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl

index ef24f92e10e5fec3586961481d83a96e31ddf420..69c4716d9e27451fd7a664cc7f0fc0776b5542fb 100755 (executable)
@@ -5614,7 +5614,7 @@ sub process {
                exit(0);
        }
 
-       if (!$is_patch) {
+       if (!$is_patch && $file !~ /cover-letter\.patch$/) {
                ERROR("NOT_UNIFIED_DIFF",
                      "Does not appear to be a unified-diff format patch\n");
        }