mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + checkpatch-allow-not-using-f-with-files-that-are-in-git-fix.patch added to -mm tree
@ 2020-09-22 18:21 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2020-09-22 18:21 UTC (permalink / raw)
  To: mm-commits, julia.lawall, joe


The patch titled
     Subject: checkpatch: fix git "fatal" warning if file argument outside kernel tree
has been added to the -mm tree.  Its filename is
     checkpatch-allow-not-using-f-with-files-that-are-in-git-fix.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/checkpatch-allow-not-using-f-with-files-that-are-in-git-fix.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-allow-not-using-f-with-files-that-are-in-git-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Joe Perches <joe@perches.com>
Subject: checkpatch: fix git "fatal" warning if file argument outside kernel tree

commit bcf4271d4bc3 ("checkpatch: allow not using -f with files that are
in git") in linux-next causes checkpatch to emit a fatal message:

fatal: <file>: '<file>' is outside repository at '<kernel_dir>'

Fix that by sending git's error output to /dev/null instead.

Link: https://lkml.kernel.org/r/b6afa04112d450c2fc120a308d706acd60cee294.camel@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Reported-by: Julia Lawall <julia.lawall@inria.fr>
Reviewed-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 scripts/checkpatch.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/scripts/checkpatch.pl~checkpatch-allow-not-using-f-with-files-that-are-in-git-fix
+++ a/scripts/checkpatch.pl
@@ -981,7 +981,7 @@ sub git_is_single_file {
 
 	return 0 if ((which("git") eq "") || !(-e "$gitroot"));
 
-	my $output = `${git_command} ls-files -- $filename`;
+	my $output = `${git_command} ls-files -- $filename 2>/dev/null`;
 	my $count = $output =~ tr/\n//;
 	return $count eq 1 && $output =~ m{^${filename}$};
 }
_

Patches currently in -mm which might be from joe@perches.com are

checkpatch-test-git_dir-changes.patch
get_maintainer-add-test-for-file-in-vcs.patch
get_maintainer-exclude-maintainers-files-from-git-fallback.patch
checkpatch-move-repeated-word-test.patch
checkpatch-add-test-for-comma-use-that-should-be-semicolon.patch
checkpatch-warn-on-self-assignments.patch
checkpatch-allow-not-using-f-with-files-that-are-in-git.patch
checkpatch-allow-not-using-f-with-files-that-are-in-git-fix.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-22 18:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22 18:21 + checkpatch-allow-not-using-f-with-files-that-are-in-git-fix.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).