From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Joe Perches <joe@perches.com>
Cc: Philippe Schenker <dev@pschenker.ch>,
Andy Whitcroft <apw@canonical.com>,
linux-kernel@vger.kernel.org,
Dwaipayan Ray <dwaipayanray1@gmail.com>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>,
Shawn Guo <shawnguo@kernel.org>,
Philippe Schenker <philippe.schenker@toradex.com>
Subject: Re: [PATCH] checkpatch: add check for fixes: tag
Date: Thu, 8 Sep 2022 09:01:00 +1000 [thread overview]
Message-ID: <20220908090100.155b9b26@canb.auug.org.au> (raw)
In-Reply-To: <1125e8a68a709e18b594f74fc9b25b9992b1582f.camel@perches.com>
[-- Attachment #1: Type: text/plain, Size: 845 bytes --]
Hi Joe,
On Wed, 07 Sep 2022 08:18:31 -0700 Joe Perches <joe@perches.com> wrote:
>
> I think the test better if it checks for a SHA1 after fixes.
>
> And IMO
>
> !(foo =~ /bar.../)
>
> is better written as
>
> foo !~ /bar.../
>
> so
>
> if ($in_commit_log &&
> $line =~ /^\s*Fixes:?\s*[0-9a-f]{5,}\b/i &&
> $line !~ /^Fixes: [0-9a-f]{12,40} \(\".*\"\)/)) {
>
> Though it's arguable that the SHA1 should _only_ be length 12
> and not longer.
It should be allowed to be longer - eventaully we will need to move on
from 12 as the repo gets bigger. Also, any line matching /^\s*Fixes:/i
should be checked, because people do add extra words before the SHA1
and sometimes just other text. You will get some hits that are not
meant to be Fixes tags, but very few.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-09-07 23:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 12:35 Philippe Schenker
2022-09-07 15:18 ` Joe Perches
2022-09-07 23:01 ` Stephen Rothwell [this message]
2022-09-08 10:01 ` Philippe Schenker
2022-09-08 14:41 ` niklas.soderlund
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=20220908090100.155b9b26@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=apw@canonical.com \
--cc=dev@pschenker.ch \
--cc=dwaipayanray1@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=philippe.schenker@toradex.com \
--cc=shawnguo@kernel.org \
/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
all inboxes | Powered by JetHome®