From: Joe Perches <joe@perches.com>
To: Tiezhu Yang <yangtiezhu@loongson.cn>,
Andy Whitcroft <apw@canonical.com>,
Dwaipayan Ray <dwaipayanray1@gmail.com>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] checkpatch: Print some info if no filenames are given
Date: Fri, 14 May 2021 21:26:05 -0700 [thread overview]
Message-ID: <68e897fec0e6258b2a964908af650d8608189454.camel@perches.com> (raw)
In-Reply-To: <1621052131-16309-1-git-send-email-yangtiezhu@loongson.cn>
On Sat, 2021-05-15 at 12:15 +0800, Tiezhu Yang wrote:
> After commit 45107ff6d526 ("checkpatch: if no filenames then read stdin"),
> if no filenames are given, it will read patch from stdin rather than exit
> directly, it is better to print some info about what to do next, otherwise
> it is a bit confusing whether the script hangs.
I think this is unnecessary.
It's like trying to make cat without command line arguments emit something.
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -361,6 +361,8 @@ if ($^V && $^V lt $minimum_perl_version) {
>
>
> #if no filenames are given, push '-' to read patch from stdin
> if ($#ARGV < 0) {
> + print "$P: missing patchfile or -f file\n";
> + print "Use --help if necessary or read patch from stdin\n";
> push(@ARGV, '-');
> }
>
>
next prev parent reply other threads:[~2021-05-15 4:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-15 4:15 Tiezhu Yang
2021-05-15 4:26 ` Joe Perches [this message]
2021-05-16 8:49 ` Lukas Bulwahn
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=68e897fec0e6258b2a964908af650d8608189454.camel@perches.com \
--to=joe@perches.com \
--cc=apw@canonical.com \
--cc=dwaipayanray1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=yangtiezhu@loongson.cn \
/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®