History

checkpatch: do not warn about -p0 patches when checking files

We are triggering the -p0 check for our own diffs generated using --file command line option. Suppress this check for files.

Andy Whitcroft committed 17 years ago

Commit e2f7aa41 parent f4a87731 file · +2 −1Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+2−1
@@ -1240,7 +1240,8 @@ sub process { · 1239 unmodified lines
1240 $realfile =~ s@^([^/]*)/@@;1240 $realfile =~ s@^([^/]*)/@@;
1241 1241
1242 $p1_prefix = $1;1242 $p1_prefix = $1;
1243 if ($tree && $p1_prefix ne '' && -e "$root/$p1_prefix") {1243 if (!$file && $tree && $p1_prefix ne '' &&
1244 -e "$root/$p1_prefix") {
1244 WARN("patch prefix '$p1_prefix' exists, appears to be a -p0 patch\n");1245 WARN("patch prefix '$p1_prefix' exists, appears to be a -p0 patch\n");
1245 }1246 }
1246 1247