From: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
To: Joe Perches <joe@perches.com>
Cc: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
linux-kernel@vger.kernel.org,
"Andy Whitcroft" <apw@canonical.com>,
"Dwaipayan Ray" <dwaipayanray1@gmail.com>,
"Lukas Bulwahn" <lukas.bulwahn@gmail.com>
Subject: Re: [PATCH] checkpatch.pl: Relax commit ID check to allow more than 12 chars
Date: Tue, 31 Jan 2023 22:00:16 +0100 [thread overview]
Message-ID: <Y9mBYEAq/g42s/S2@probook> (raw)
In-Reply-To: <78d224a63f6c27bf700d59007b6f3c89746d728c.camel@perches.com>
[-- Attachment #1: Type: text/plain, Size: 3001 bytes --]
On Sun, Jan 29, 2023 at 09:52:38AM -0800, Joe Perches wrote:
> On Sun, 2023-01-29 at 13:34 +0100, Jonathan Neuschäfer wrote:
> > By now, `git log --pretty=%h` (on my copy of linux.git) prints commit
> > hashes with 13 digits, because of the number of objects.
> >
> > Relax the rule in checkpatch.pl to allow a few more digits (up to 16).
>
> NAK without updating the process docs first.
Good point, I'll do that.
Thanks,
Jonathan
>
> Documentation/process/submitting-patches.rst-If your patch fixes a bug in a specific commit, e.g. you found an issue using
> Documentation/process/submitting-patches.rst:``git bisect``, please use the 'Fixes:' tag with the first 12 characters of
> Documentation/process/submitting-patches.rst-the SHA-1 ID, and the one line summary. Do not split the tag across multiple
> Documentation/process/submitting-patches.rst-lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify
> Documentation/process/submitting-patches.rst-parsing scripts. For example::
> Documentation/process/submitting-patches.rst-
> Documentation/process/submitting-patches.rst- Fixes: 54a4f0239f2e ("KVM: MMU: make kvm_mmu_zap_page() return the number of pages it actually fr>
> Documentation/process/submitting-patches.rst-
> Documentation/process/submitting-patches.rst-The following ``git config`` settings can be used to add a pretty format for
> Documentation/process/submitting-patches.rst-outputting the above style in the ``git log`` or ``git show`` commands::
> Documentation/process/submitting-patches.rst-
> Documentation/process/submitting-patches.rst- [core]
> Documentation/process/submitting-patches.rst: abbrev = 12
> Documentation/process/submitting-patches.rst- [pretty]
> Documentation/process/submitting-patches.rst- fixes = Fixes: %h (\"%s\")
>
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
> > @@ -3177,7 +3177,7 @@ sub process {
> > $tag_case = 0 if $tag eq "Fixes:";
> > $tag_space = 0 if ($line =~ /^fixes:? [0-9a-f]{5,} ($balanced_parens)/i);
> >
> > - $id_length = 0 if ($orig_commit =~ /^[0-9a-f]{12}$/i);
> > + $id_length = 0 if ($orig_commit =~ /^[0-9a-f]{12,16}$/i);
> > $id_case = 0 if ($orig_commit !~ /[A-F]/);
> >
> > # Always strip leading/trailing parens then double quotes if existing
> > @@ -3194,7 +3194,7 @@ sub process {
> > if ($ctitle ne $title || $tag_case || $tag_space ||
> > $id_length || $id_case || !$title_has_quotes) {
> > if (WARN("BAD_FIXES_TAG",
> > - "Please use correct Fixes: style 'Fixes: <12 chars of sha1> (\"<title line>\")' - ie: 'Fixes: $cid (\"$ctitle\")'\n" . $herecurr) &&
> > + "Please use correct Fixes: style 'Fixes: <12-16 chars of sha1> (\"<title line>\")' - ie: 'Fixes: $cid (\"$ctitle\")'\n" . $herecurr) &&
> > $fix) {
> > $fixed[$fixlinenr] = "Fixes: $cid (\"$ctitle\")";
> > }
> > --
> > 2.39.0
> >
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-01-31 21:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-29 12:34 [PATCH] checkpatch.pl: Relax commit ID check to allow more than 12 chars Jonathan Neuschäfer
2023-01-29 17:52 ` Joe Perches
2023-01-31 21:00 ` Jonathan Neuschäfer [this message]
2023-02-04 16:57 ` Joe Perches
2023-02-05 10:40 ` Jonathan Neuschäfer
2023-02-05 16:33 ` Randy Dunlap
2023-02-05 20:38 ` Linus Torvalds
2023-02-06 8:38 ` Geert Uytterhoeven
2023-02-06 11:09 ` Joe Perches
2023-02-06 11:54 ` Geert Uytterhoeven
2023-02-06 12:25 ` Joe Perches
2023-02-07 14:47 ` Jonathan Neuschäfer
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=Y9mBYEAq/g42s/S2@probook \
--to=j.neuschaefer@gmx.net \
--cc=apw@canonical.com \
--cc=dwaipayanray1@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox