From: Joe Perches <joe@perches.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>,
Thomas Gleixner <tglx@linutronix.de>,
avarab@gmail.com
Cc: Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
Peter Zijlstra <peterz@infradead.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>
Subject: Re: linux-next: Fixes tag needs some work in the tip tree
Date: Thu, 17 Jan 2019 17:19:37 -0800 [thread overview]
Message-ID: <40bfc40958fca6e2cc9b86101153aa0715fac4f7.camel@perches.com> (raw)
In-Reply-To: <20190118113230.3d11be0c@canb.auug.org.au>
On Fri, 2019-01-18 at 11:32 +1100, Stephen Rothwell wrote:
> Hi Thomas,
>
> On Fri, 18 Jan 2019 00:45:44 +0100 (CET) Thomas Gleixner <tglx@linutronix.de> wrote:
> > On Fri, 18 Jan 2019, Stephen Rothwell wrote:
> > > Commit
> > >
> > > a31e184e4f69 ("x86/pkeys: Properly copy pkey state at fork()")
> > >
> > > Fixes tag
> > >
> > > Fixes: e8c24d3a23a ("x86/pkeys: Allocation/free syscalls")
> > >
> > > has these problems:
> > >
> > > - SHA1 should be at least 12 digits long
> >
> > Sigh. I'll add that to my sanity checks, but this one has to be as is as
> > it's in the middle of a series of fixes pending for linus tree.
>
> That's OK, more of a reminder ... the abbreviated SHA1 is unique now,
> but may not be in the future - of course 12 digits does not guarantee
> that either. I am told we already have some clashes using 11 digits :-(
Ævar Arnfjörð Bjarmason sent a [atch to
Documentation/process/submitting-patches.rst
for that .gitconfig default length problem last month.
https://lore.kernel.org/patchwork/patch/1026639/
Perhaps something will come of that one day.
It does seem that of the 30K or so commits with "Fixes:" that
the style has standardized on the typical form below where
12 ("") is a 12 char SHA1 and ("") is the commit description
21911 Fixes: 12 ("")
1151 Fixes: 13 ("")
1053 Fixes: 12 (')
541 Fixes: 16 ("")
325 Fixes: 10 ("")
323 Fixes: 40
274 Fixes:
272 Fixes: 12 ""
256 Fixes: 11 ("")
217 Fixes: 14 ("")
188 Fixes: commit 12 ("")
181 Fixes: 8 ("")
178 Fixes: 7 ("")
163 Fixes: 9 ("")
94 Fixes: 15 ("")
51 Fixes: 12("")
48 Fixes: 13 (')
38 Fixes: 12
35 Fixes: 12(')
34 Fixes: 40 ("")
30 Fixes: 12 (""
28 Fixes: 17 ("")
24 Fixes: Commit 12 ("")
So for checkpatch, maybe something like the below
would help standardize the Fixes line:
---
scripts/checkpatch.pl | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 155fa9305166..a1aa3787d0b0 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2730,10 +2730,11 @@ sub process {
$line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
- $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&
- $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) {
+ $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i))) {
my $init_char = "c";
my $orig_commit = "";
+ my $prefix = "commit";
+ my $prefix_case = "[Cc]ommit";
my $short = 1;
my $long = 0;
my $case = 1;
@@ -2744,18 +2745,24 @@ sub process {
my $orig_desc = "commit description";
my $description = "";
- if ($line =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) {
+ if ($line =~ /\b(f)ixes:\s+([0-9a-f]{5,})\b/i) {
+ $init_char = $1;
+ $orig_commit = lc($2);
+ $prefix = "Fixes:";
+ $prefix_case = "Fixes:";
+ $init_char = "F";
+ } elsif ($line =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) {
$init_char = $1;
$orig_commit = lc($2);
} elsif ($line =~ /\b([0-9a-f]{12,40})\b/i) {
$orig_commit = lc($1);
}
- $short = 0 if ($line =~ /\bcommit\s+[0-9a-f]{12,40}/i);
- $long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i);
- $space = 0 if ($line =~ /\bcommit [0-9a-f]/i);
- $case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/);
- if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) {
+ $short = 0 if ($line =~ /\b$prefix\s+[0-9a-f]{12,40}/i);
+ $long = 1 if ($line =~ /\b$prefix\s+[0-9a-f]{41,}/i);
+ $space = 0 if ($line =~ /\b$prefix [0-9a-f]/i);
+ $case = 0 if ($line =~ /\b$prefix_case\s+[0-9a-f]{5,40}[^A-F]/);
+ if ($line =~ /\b$prefix\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) {
$orig_desc = $1;
$hasparens = 1;
} elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i &&
@@ -2763,10 +2770,10 @@ sub process {
$rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) {
$orig_desc = $1;
$hasparens = 1;
- } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
+ } elsif ($line =~ /\b$prefix\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
defined $rawlines[$linenr] &&
$rawlines[$linenr] =~ /^\s*[^"]+"\)/) {
- $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i;
+ $line =~ /\b$prefix\s+[0-9a-f]{5,}\s+\("([^"]+)$/i;
$orig_desc = $1;
$rawlines[$linenr] =~ /^\s*([^"]+)"\)/;
$orig_desc .= " " . $1;
@@ -2779,7 +2786,7 @@ sub process {
if (defined($id) &&
($short || $long || $space || $case || ($orig_desc ne $description) || !$hasparens)) {
ERROR("GIT_COMMIT_ID",
- "Please use git commit description style 'commit <12+ chars of sha1> (\"<title line>\")' - ie: '${init_char}ommit $id (\"$description\")'\n" . $herecurr);
+ "Please use git commit description style '$prefix <12+ chars of sha1> (\"<title line>\")' - ie: '${init_char}" . substr($prefix, 1) . " $id (\"$description\")'\n" . $herecurr);
}
}
next prev parent reply other threads:[~2019-01-18 1:19 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 22:31 linux-next: Fixes tag needs some work in the tip tree Stephen Rothwell
2019-01-17 23:45 ` Thomas Gleixner
2019-01-18 0:32 ` Stephen Rothwell
2019-01-18 1:19 ` Joe Perches [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-01-17 22:35 Stephen Rothwell
2019-01-17 23:19 ` Thomas Gleixner
2019-02-10 20:36 Stephen Rothwell
2019-02-11 7:17 ` Ingo Molnar
2019-04-25 21:09 Stephen Rothwell
2019-05-03 10:22 Stephen Rothwell
2019-06-22 14:06 Stephen Rothwell
2019-08-25 13:31 Stephen Rothwell
2019-08-28 22:06 Stephen Rothwell
2019-08-29 8:26 ` Bandan Das
2019-08-29 9:18 ` Stephen Rothwell
2020-03-24 20:44 Stephen Rothwell
2020-08-20 6:12 Stephen Rothwell
2020-08-20 8:21 ` Borislav Petkov
2020-08-20 9:15 ` Stephen Rothwell
2020-08-20 9:20 ` Borislav Petkov
2020-08-20 9:22 ` David Sterba
2020-08-20 9:26 ` Borislav Petkov
2020-09-30 12:52 Stephen Rothwell
2020-09-30 12:53 Stephen Rothwell
2020-10-28 10:19 Stephen Rothwell
2020-11-08 21:43 Stephen Rothwell
2020-11-22 10:06 Stephen Rothwell
2021-03-01 20:28 Stephen Rothwell
2021-03-28 21:30 Stephen Rothwell
2021-03-28 22:56 ` Masami Hiramatsu
2021-05-08 2:18 Stephen Rothwell
2021-05-08 10:02 ` Song Bao Hua (Barry Song)
2021-05-20 11:50 Stephen Rothwell
2021-06-24 11:16 Stephen Rothwell
2021-11-25 21:17 Stephen Rothwell
2021-12-16 18:49 Stephen Rothwell
2022-04-09 5:23 Stephen Rothwell
2022-05-12 10:49 Stephen Rothwell
2022-05-22 0:46 Stephen Rothwell
2024-02-27 21:03 Stephen Rothwell
2024-03-14 21:09 Stephen Rothwell
2024-03-15 14:29 ` Thomas Gleixner
2025-02-27 21:36 Stephen Rothwell
2025-03-17 13:14 Stephen Rothwell
2025-05-20 12:49 Stephen Rothwell
2025-05-20 16:46 ` Xin Li
2025-05-21 7:30 ` Ingo Molnar
2025-06-24 11:15 Stephen Rothwell
2025-06-24 12:15 ` Borislav Petkov
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=40bfc40958fca6e2cc9b86101153aa0715fac4f7.camel@perches.com \
--to=joe@perches.com \
--cc=avarab@gmail.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
/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