Skip to contentSkip to conversation

checkpatch: Fix NOT_UNIFIED_DIFF error exception

PATCH Superseded Matthew R. Ochs 1 participant 1 message Sep 23, 2015 Checkpatch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 checkpatch: Fix NOT_UNIFIED_DIFF error exception

Commit 06330fc40e3f ("checkpatch: Avoid NOT_UNIFIED_DIFF errors on cover-letter.patch files") added an exception to bypass the unified-diff check for cover letters. The patch evaluates the cover letter regex against $file. Instead it should use $filename.

This patch corrects the variable.

---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +1 -1
index f2a1131..fdb1e48 100755
@@ -5808,7 +5808,7 @@ sub process {
 		exit(0);
 	}
 
-	if (!$is_patch && $file !~ /cover-letter\.patch$/) {
+	if (!$is_patch && $filename !~ /cover-letter\.patch$/) {
 		ERROR("NOT_UNIFIED_DIFF",
 		      "Does not appear to be a unified-diff format patch\n");
 	}
Signature · 1 line
2.1.0