From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE14126B6D 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> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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.