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 79F63EB64DD for ; Tue, 25 Jul 2023 22:19:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229447AbjGYWSb (ORCPT ); Tue, 25 Jul 2023 18:18:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232047AbjGYWRD (ORCPT ); Tue, 25 Jul 2023 18:17:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5ECB83A9E for ; Tue, 25 Jul 2023 15:15:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CAC2661924 for ; Tue, 25 Jul 2023 22:15:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF6EEC433C8; Tue, 25 Jul 2023 22:15:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690323353; bh=R8hDw13PkX4HnETJNxCMRO4YjpeRUQPJLGHS8yBElLM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NVmTupd2cexcEtLMEZ7j0wrpJNTbo88NpuFjFZHF0vIay7SlSgTI1IDjwkfsWHENn bfUDsklcZw6+yh4uk2K0IJYd1C9DQ6Jh4Gh8BAhSA4Q83Z/gcaKP508+J6PUk+CohD Ub/yycpVwUPOp7ATlrxSiIOLGe7njFWlcknXlTQNftDwTKjFAqyBMLafdOXJFOCssM M3uVlPORfEwKj7azXLVwk6Ws8uBbF20qG4M0y0c+j5Rwu5CvVcxjevPQ2CDV0s2OpI rWGjC4cuKyHrx7+NdSe7avUKpPuYXjHpUAkO0x4Lqhpr8NXUevfOG/cmb0XnTmnZ6o 9iOMTXc4JSq5Q== Date: Tue, 25 Jul 2023 15:15:52 -0700 From: Jakub Kicinski To: Joe Perches Cc: krzk@kernel.org, geert@linux-m68k.org, netdev@vger.kernel.org, workflows@vger.kernel.org, mario.limonciello@amd.com Subject: Re: [PATCH] scripts: checkpatch: steer people away from using file paths Message-ID: <20230725151552.723f1e3f@kernel.org> In-Reply-To: References: <20230725155926.2775416-1-kuba@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: workflows@vger.kernel.org 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. > > @@ -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.