提交 e2f7aa4b 编写于 作者: A Andy Whitcroft 提交者: Linus Torvalds

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.
Signed-off-by: NAndy Whitcroft <apw@canonical.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 f4a87736
......@@ -1240,7 +1240,8 @@ sub process {
$realfile =~ s@^([^/]*)/@@;
$p1_prefix = $1;
if ($tree && $p1_prefix ne '' && -e "$root/$p1_prefix") {
if (!$file && $tree && $p1_prefix ne '' &&
-e "$root/$p1_prefix") {
WARN("patch prefix '$p1_prefix' exists, appears to be a -p0 patch\n");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册