From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD796C0015E for ; Wed, 26 Jul 2023 06:28:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231479AbjGZG2b convert rfc822-to-8bit (ORCPT ); Wed, 26 Jul 2023 02:28:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231235AbjGZG2a (ORCPT ); Wed, 26 Jul 2023 02:28:30 -0400 Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADAEDBF; Tue, 25 Jul 2023 23:28:29 -0700 (PDT) Received: from omf19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 3A834C0150; Wed, 26 Jul 2023 06:28:28 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf19.hostedemail.com (Postfix) with ESMTPA id C9B7820025; Wed, 26 Jul 2023 06:28:25 +0000 (UTC) Message-ID: Subject: Re: [PATCH] scripts: checkpatch: steer people away from using file paths From: Joe Perches To: Jakub Kicinski Cc: krzk@kernel.org, geert@linux-m68k.org, netdev@vger.kernel.org, workflows@vger.kernel.org, mario.limonciello@amd.com Date: Tue, 25 Jul 2023 23:28:24 -0700 In-Reply-To: <20230725151552.723f1e3f@kernel.org> References: <20230725155926.2775416-1-kuba@kernel.org> <20230725151552.723f1e3f@kernel.org> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Stat-Signature: awr37tkfip7dcaomwuf7jtquxud3m8yf X-Rspamd-Server: rspamout04 X-Rspamd-Queue-Id: C9B7820025 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1815yvRKKyMguVYqdlA3AIf4D88aUj5UI4= X-HE-Tag: 1690352905-893079 X-HE-Meta: U2FsdGVkX1+nzYTcXRa3IiPdklZ9ylaVb/pwnm0K1jMFFQ64HHX55PpV0Fud650S/FPkGKjG7TeTYSq38E2//SrnUBVlHU3cdi+3tyeyzWI7tOLoZ9DYZVWaf/4yYC0FP5IIC4q/Fth2d+0HifWNXr0amqVJpp4BpNBtvvT+StrOYtNmw+/GeYwnSXThSx1ZsfycWwcI2/tm7uzetKSWHwdMyAPNu+qUr0qpVWLBzjDWkP+clyFz1x1KXhi3UkYgs5U/JRXJgVGjdOlNREAiVadxRpfPY8JiUaiGALTylpSHpGTaQ50k0noXsKbuv+wJ Precedence: bulk List-ID: X-Mailing-List: workflows@vger.kernel.org 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: > > 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.