scripts/checkpatch: Do not use mailmap and check qemu-trivial@ author
cover scripts/checkpatch: Do not use mailmap and check qemu-trivial@ author
- qemu-trivial@ is not checked
- mailmap hides the mistakes we want to catch
See https://lore.kernel.org/qemu-devel/[email protected]/
Philippe Mathieu-Daudé (2):
scripts/checkpatch: Avoid author email mangled by qemu-trivial@ scripts/checkpatch: Do not use mailmap
scripts/checkpatch.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.41.0
PATCH 1/2 scripts/checkpatch: Avoid author email mangled by qemu-trivial@
Commit f5177798d8 ("scripts: report on author emails that are mangled by the mailing list") added a check for qemu-devel@ list, complete with qemu-trivial@.
--- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +1 -1
@@ -1573,7 +1573,7 @@ sub process { $is_patch = 1; } - if ($line =~ /^(Author|From): .* via .*<qemu-devel\@nongnu.org>/) { + if ($line =~ /^(Author|From): .* via .*<qemu-(devel|trivial)\@nongnu\.org>/) { ERROR("Author email address is mangled by the mailing list\n" . $herecurr); }
Signature · 1 line
2.41.0
Re: [PATCH 1/2] scripts/checkpatch: Avoid author email mangled by qemu-trivial@
Quoted 15 lines · Philippe Mathieu-Daudé
Commit
f5177798d8("scripts: report on author emails that are mangled by the mailing list") added a check for qemu-devel@ list, complete with qemu-trivial@.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/checkpatch.pl +0
-0
scripts/checkpatch.pl sub process { · line 1576
Quoted 5 lines
scripts/checkpatch.pl +1
-1@@ -1573,7 +1573,7 @@ sub process { $is_patch = 1; } - if ($line =~ /^(Author|From): .* via .*<qemu-devel\@nongnu.org>/) { + if ($line =~ /^(Author|From): .* via .*<qemu-(devel|trivial)\@nongnu\.org>/) {
I recommend checking against qemu-.* rather than trying to capture explicitly all the suffixes we have. (For instance there's a line in mailmap for a commit that was attributed to qemu-block@, which this change still wouldn't catch.)
thanks
-- PMM
Re: [PATCH 1/2] scripts/checkpatch: Avoid author email mangled by qemu-trivial@
Quoted 19 lines · Peter Maydell
Quoted 18 lines · Philippe Mathieu-Daudé
Commit
f5177798d8("scripts: report on author emails that are mangled by the mailing list") added a check for qemu-devel@ list, complete with qemu-trivial@.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/checkpatch.pl +0
-0@@ -1573,7 +1573,7 @@ sub process { $is_patch = 1; }
Quoted 7 lines
scripts/checkpatch.pl sub process { · line 1576
Quoted 2 lines
scripts/checkpatch.pl +1
-1- if ($line =~ /^(Author|From): .* via .*<qemu-devel\@nongnu.org>/) { + if ($line =~ /^(Author|From): .* via .*<qemu-(devel|trivial)\@nongnu\.org>/) {I recommend checking against qemu-.* rather than trying to capture explicitly all the suffixes we have. (For instance there's a line in mailmap for a commit that was attributed to qemu-block@, which this change still wouldn't catch.)
Oh, good point.
Re: [PATCH 1/2] scripts/checkpatch: Avoid author email mangled by qemu-trivial@
Quoted 30 lines · Philippe Mathieu-Daudé
Quoted 19 lines · Peter Maydell
Quoted 18 lines · Philippe Mathieu-Daudé
Commit
f5177798d8("scripts: report on author emails that are mangled by the mailing list") added a check for qemu-devel@ list, complete with qemu-trivial@.Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
scripts/checkpatch.pl| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)scripts/checkpatch.pl +0
-0@@ -1573,7 +1573,7 @@ sub process { $is_patch = 1; }Quoted 9 lines
scripts/checkpatch.pl sub process { · line 1578
Quoted 4 lines
scripts/checkpatch.pl +1
-1- if ($line =~ /^(Author|From): .* via .*<qemu-devel\@nongnu.org>/) { + if ($line =~ /^(Author|From): .* via .*<qemu-(devel|trivial)\@nongnu\.org>/) {I recommend checking against qemu-.* rather than trying to capture explicitly all the suffixes we have. (For instance there's a line in mailmap for a commit that was attributed to qemu-block@, which this change still wouldn't catch.)
Quoted 1 line
Oh, good point.
And also [email protected]:
commit 5cbd51a5a58098444ffa246ece2013849be04299
Author: BALATON Zoltan via <[email protected]> Date: Sun Jan 3 02:09:33 2021 +0100
PATCH 2/2 scripts/checkpatch: Do not use mailmap
In reply to Philippe Mathieu-DaudéThe .mailmap file fixes mistake we already did. Do not use it when running checkpatch.pl, otherwise we might commit the very same mistakes.
--- scripts/checkpatch.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
scripts/checkpatch.pl +3 -3
@@ -435,8 +435,8 @@ if ($chk_branch) { my @patches; my %git_commits = (); my $HASH; - open($HASH, "-|", "git", "log", "--reverse", "--no-merges", "--format=%H %s", $ARGV[0]) || - die "$P: git log --reverse --no-merges --format='%H %s' $ARGV[0] failed - $!\n"; + open($HASH, "-|", "git", "log", "--reverse", "--no-merges", "--no-mailmap", "--format=%H %s", $ARGV[0]) || + die "$P: git log --reverse --no-merges --no-mailmap --format='%H %s' $ARGV[0] failed - $!\n"; for my $line (<$HASH>) { $line =~ /^([0-9a-fA-F]{40,40}) (.*)$/;
@@ -460,7 +460,7 @@ if ($chk_branch) { "-c", "diff.renamelimit=0", "-c", "diff.renames=True", "-c", "diff.algorithm=histogram", - "show", + "show", "--no-mailmap", "--patch-with-stat", $hash) || die "$P: git show $hash - $!\n"; while (<$FILE>) {
Signature · 1 line
2.41.0