From: Julia Lawall <julia.lawall@inria.fr>
To: Joe Perches <joe@perches.com>
Cc: apw@canonical.com, linux-kernel@vger.kernel.org,
linux@rasmusvillemoes.dk
Subject: Re: outside repository fatal error
Date: Sun, 20 Sep 2020 18:03:07 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2009201802270.2966@hadrien> (raw)
In-Reply-To: <cca15cb7889f25ab010300a3e7e55dd63478c1fc.camel@perches.com>
On Sun, 20 Sep 2020, Joe Perches wrote:
> On Sun, 2020-09-20 at 13:53 +0200, Julia Lawall wrote:
> > The commit bcf4271d4bc3 ("checkpatch: allow not using -f with files that
> > are in git") in linux-next seems to cause checkpatch to fail on a file
> > containing a patch if that file is not in the directory containing the
> > Linux kernel.
>
> Thanks for the report.
>
> > Is that intentional?
>
> No. It doesn't really fail, it just emits a fatal
> warning from git.
>
> I believe this makes it better by silencing the error.
It seems fine now.
Reviewed-by: Julia Lawall <julia.lawall@inria.fr>
julia
> ---
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 3e474072aa90..469f8e7456df 100755
> --- a/scripts/checkpatch.pl
> +++ b/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}$};
> }
>
>
>
>
next prev parent reply other threads:[~2020-09-20 16:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-20 11:53 Julia Lawall
2020-09-20 15:34 ` Joe Perches
2020-09-20 16:03 ` Julia Lawall [this message]
2020-09-20 16:20 ` [PATCH -next] checkpatch: Fix git "fatal" warning if file argument outside kernel tree Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.22.394.2009201802270.2966@hadrien \
--to=julia.lawall@inria.fr \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®