All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Ignacio Peña" <ignacio.pena87@gmail.com>
Cc: Joe Perches <joe@perches.com>, Andy Whitcroft <apw@canonical.com>,
	Dwaipayan Ray <dwaipayanray1@gmail.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] checkpatch: enforce 12-char SHA for Fixes tags
Date: Tue, 22 Jul 2025 10:00:38 +0200	[thread overview]
Message-ID: <2025072220-founding-lapdog-c8e9@gregkh> (raw)
In-Reply-To: <20250721162437.6691-2-ignacio.pena87@gmail.com>

On Mon, Jul 21, 2025 at 12:24:33PM -0400, Ignacio Peña wrote:
> The kernel documentation recommends using 12 character SHA-1 hashes
> in Fixes tags as the best practice. While 8 characters might be
> sufficient for uniqueness in smaller projects, the kernel's large
> history makes collisions more likely with shorter hashes.
> 
> Change the existing check from "at least 8" to "exactly 12" to
> encourage consistency and future-proof practices.

That's not what this patch does.  You are changing it from "12+" to
"exactly 12".  There's no 8 character check here that I can see.


> 
> Link: https://docs.kernel.org/process/submitting-patches.html#describe-your-changes
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ignacio Pena <ignacio.pena87@gmail.com>
> ---
>  scripts/checkpatch.pl | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 7ccdc774a..204800232 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3242,7 +3242,7 @@ sub process {
>  			my $tag_case = not ($tag eq "Fixes:");
>  			my $tag_space = not ($line =~ /^fixes:? [0-9a-f]{5,40} ($balanced_parens)/i);
>  
> -			my $id_length = not ($orig_commit =~ /^[0-9a-f]{12,40}$/i);

That is checking for 12-40 long, right?  Not 8 :)

thanks,

greg k-h

  reply	other threads:[~2025-07-22  8:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-21 16:24 [PATCH 1/3] checkpatch: warn about novice phrases in commit messages Ignacio Peña
2025-07-21 16:24 ` [PATCH 2/3] checkpatch: enforce 12-char SHA for Fixes tags Ignacio Peña
2025-07-22  8:00   ` Greg Kroah-Hartman [this message]
2025-07-21 16:24 ` [PATCH 3/3] checkpatch: suggest including testing evidence Ignacio Peña
2025-07-22  7:59   ` Greg Kroah-Hartman
2025-07-22 17:58 ` [PATCH 1/3] checkpatch: warn about novice phrases in commit messages Joe Perches
2025-07-23  3:02 ` [PATCH v2 1/2] " Ignacio Peña
2025-07-23  3:02   ` [PATCH v2 2/2] checkpatch: enforce 12-char SHA for Fixes tags Ignacio Peña
2025-07-23  5:18     ` Greg Kroah-Hartman
2025-07-23  3:26   ` [PATCH v2 1/2] checkpatch: warn about novice phrases in commit messages Joe Perches
2025-07-24  3:28   ` [PATCH v3] " Ignacio Peña
2025-07-24  7:04     ` Joe Perches

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=2025072220-founding-lapdog-c8e9@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=apw@canonical.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=ignacio.pena87@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.