qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] scripts/checkpatch: Do not use mailmap and check qemu-trivial@ author
@ 2024-04-02 11:30 Philippe Mathieu-Daudé
  2024-04-02 11:30 ` [PATCH 1/2] scripts/checkpatch: Avoid author email mangled by qemu-trivial@ Philippe Mathieu-Daudé
  2024-04-02 11:30 ` [PATCH 2/2] scripts/checkpatch: Do not use mailmap Philippe Mathieu-Daudé
  0 siblings, 2 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-04-02 11:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P . Berrangé, Peter Maydell, Michael Tokarev,
	Stefan Weil, Philippe Mathieu-Daudé, Laurent Vivier,
	qemu-trivial

- qemu-trivial@ is not checked
- mailmap hides the mistakes we want to catch

See https://lore.kernel.org/qemu-devel/60faa39d-52e8-46f1-8bd9-9d9661794880@tls.msk.ru/

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(-)

-- 
2.41.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] scripts/checkpatch: Avoid author email mangled by qemu-trivial@
  2024-04-02 11:30 [PATCH 0/2] scripts/checkpatch: Do not use mailmap and check qemu-trivial@ author Philippe Mathieu-Daudé
@ 2024-04-02 11:30 ` Philippe Mathieu-Daudé
  2024-04-02 11:52   ` Peter Maydell
  2024-04-02 11:30 ` [PATCH 2/2] scripts/checkpatch: Do not use mailmap Philippe Mathieu-Daudé
  1 sibling, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-04-02 11:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P . Berrangé, Peter Maydell, Michael Tokarev,
	Stefan Weil, 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é <philmd@linaro.org>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 7026895074..4fe4cfd631 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -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);
 		}
 
-- 
2.41.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] scripts/checkpatch: Do not use mailmap
  2024-04-02 11:30 [PATCH 0/2] scripts/checkpatch: Do not use mailmap and check qemu-trivial@ author Philippe Mathieu-Daudé
  2024-04-02 11:30 ` [PATCH 1/2] scripts/checkpatch: Avoid author email mangled by qemu-trivial@ Philippe Mathieu-Daudé
@ 2024-04-02 11:30 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-04-02 11:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P . Berrangé, Peter Maydell, Michael Tokarev,
	Stefan Weil, 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.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 scripts/checkpatch.pl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 4fe4cfd631..234d566172 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -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>) {
-- 
2.41.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] scripts/checkpatch: Avoid author email mangled by qemu-trivial@
  2024-04-02 11:30 ` [PATCH 1/2] scripts/checkpatch: Avoid author email mangled by qemu-trivial@ Philippe Mathieu-Daudé
@ 2024-04-02 11:52   ` Peter Maydell
  2024-04-02 11:53     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2024-04-02 11:52 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Daniel P . Berrangé, Michael Tokarev,
	Stefan Weil

On Tue, 2 Apr 2024 at 12:30, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> 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é <philmd@linaro.org>
> ---
>  scripts/checkpatch.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 7026895074..4fe4cfd631 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] scripts/checkpatch: Avoid author email mangled by qemu-trivial@
  2024-04-02 11:52   ` Peter Maydell
@ 2024-04-02 11:53     ` Philippe Mathieu-Daudé
  2024-04-02 11:56       ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-04-02 11:53 UTC (permalink / raw)
  To: Peter Maydell
  Cc: qemu-devel, Daniel P . Berrangé, Michael Tokarev,
	Stefan Weil

On 2/4/24 13:52, Peter Maydell wrote:
> On Tue, 2 Apr 2024 at 12:30, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>
>> 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é <philmd@linaro.org>
>> ---
>>   scripts/checkpatch.pl | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index 7026895074..4fe4cfd631 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -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.)

Oh, good point.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] scripts/checkpatch: Avoid author email mangled by qemu-trivial@
  2024-04-02 11:53     ` Philippe Mathieu-Daudé
@ 2024-04-02 11:56       ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-04-02 11:56 UTC (permalink / raw)
  To: Peter Maydell
  Cc: qemu-devel, Daniel P . Berrangé, Michael Tokarev,
	Stefan Weil

On 2/4/24 13:53, Philippe Mathieu-Daudé wrote:
> On 2/4/24 13:52, Peter Maydell wrote:
>> On Tue, 2 Apr 2024 at 12:30, Philippe Mathieu-Daudé 
>> <philmd@linaro.org> wrote:
>>>
>>> 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é <philmd@linaro.org>
>>> ---
>>>   scripts/checkpatch.pl | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>>> index 7026895074..4fe4cfd631 100755
>>> --- a/scripts/checkpatch.pl
>>> +++ b/scripts/checkpatch.pl
>>> @@ -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.)
> 
> Oh, good point.

And also qemu-ppc@nongnu.org:

commit 5cbd51a5a58098444ffa246ece2013849be04299
Author: BALATON Zoltan via <qemu-ppc@nongnu.org>
Date:   Sun Jan 3 02:09:33 2021 +0100



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-02 12:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-02 11:30 [PATCH 0/2] scripts/checkpatch: Do not use mailmap and check qemu-trivial@ author Philippe Mathieu-Daudé
2024-04-02 11:30 ` [PATCH 1/2] scripts/checkpatch: Avoid author email mangled by qemu-trivial@ Philippe Mathieu-Daudé
2024-04-02 11:52   ` Peter Maydell
2024-04-02 11:53     ` Philippe Mathieu-Daudé
2024-04-02 11:56       ` Philippe Mathieu-Daudé
2024-04-02 11:30 ` [PATCH 2/2] scripts/checkpatch: Do not use mailmap Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).