[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cd8771cb54c48e504d89d69fe18c1347d93def19.camel@perches.com>
Date: Tue, 25 Jul 2023 23:28:24 -0700
From: Joe Perches <joe@...ches.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: krzk@...nel.org, geert@...ux-m68k.org, netdev@...r.kernel.org,
workflows@...r.kernel.org, mario.limonciello@....com
Subject: Re: [PATCH] scripts: checkpatch: steer people away from using file
paths
On Tue, 2023-07-25 at 15:15 -0700, Jakub Kicinski wrote:
> On Tue, 25 Jul 2023 14:18:15 -0700 Joe Perches wrote:
> > > @@ -544,7 +546,13 @@ foreach my $file (@ARGV) {
> > > if ($from_filename && (vcs_exists() && !vcs_file_exists($file))) {
> > > warn "$P: file '$file' not found in version control $!\n";
> > > }
> > > - if ($from_filename || ($file ne "&STDIN" && vcs_file_exists($file))) {
> > > + if ($from_filename) {
> > > + if (!$silence_file_warning) {
> > > + warn "$P: WARNING: Prefer running the script on patches as "
> > > + . "generated by git format-patch. Selecting paths is known "
> > > + . "to miss recipients!\n";
> >
> > Don't separate a single output message into multiple lines.
> > Coalesce the string elements.
> >
> > Also, this should show some reason why this isn't appropriate
> > as a patch to a single file would not have this issue.
> >
> > e.g.: When a patch series touches multiple files, showing all maintainers is useful. see: <some process doc>
>
> I tried to do that in --help. Added the "multiple files" one there, too.
It'd be more useful in the warning message.
Hardly anyone reads help.
>
> > > @@ -1089,6 +1098,10 @@ version: $V
> > > --pattern-depth=0 --remove-duplicates --rolestats]
> > >
> > > Notes:
> > > + Using "-f file" is generally discouraged, running the script on a filepatch
> > > + (as generated by git format-patch) is usually the right thing to do.
> > > + Commit message is an integral part of the change and $P
> > > + will extract additional information from it (keywords, Fixes tags etc.)
> >
> > "filepatch" doesn't appear in the kernel at all. Use "patch file".
>
> I got it the wrong way around. I'll use patchfile (no space) for v2
> since that's what's what get_maintainer uses in two other places.
Powered by blists - more mailing lists