Skip to contentSkip to conversation

scripts/get_maintainer.pl: obey ignore list

PATCH In review Trevor Woerner 2 participants 4 messages Jun 11, 2021 GET_MAINTAINER script

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/get_maintainer.pl: obey ignore list

If the user creates a .get_maintainer.ignore file, make sure it is consulted and obeyed for *all* emails discovered by the script.

---
 scripts/get_maintainer.pl | 1 +
 1 file changed, 1 insertion(+)
scripts/get_maintainer.pl +1 -0
index e3b41616c9..8c0fb8656e 100755
@@ -2435,6 +2435,7 @@ sub merge_email {
 
     for (@_) {
 	my ($address, $role) = @$_;
+	next if (ignore_email_address($address));
 	if (!$saw{$address}) {
 	    if ($output_roles) {
 		push(@lines, "$address ($role)");
Signature · 1 line
2.30.0.rc0
#1 lore raw
Quoted 13 lines · Trevor Woerner

If the user creates a .get_maintainer.ignore file, make sure it is consulted and obeyed for *all* emails discovered by the script.

---
 scripts/get_maintainer.pl | 1 +
 1 file changed, 1 insertion(+)
scripts/get_maintainer.pl +0 -0
index e3b41616c9..8c0fb8656e 100755

scripts/get_maintainer.pl sub merge_email { · line 2441

Quoted 7 lines
scripts/get_maintainer.pl +1 -0
@@ -2435,6 +2435,7 @@ sub merge_email {
 
     for (@_) {
 	my ($address, $role) = @$_;
+	next if (ignore_email_address($address));
 	if (!$saw{$address}) {
 	    if ($output_roles) {
 		push(@lines, "$address ($role)");

This got me to check and see that yes, our copy of get_maintainers.pl is out of date from Linux. And in fact, a re-sync will let us add a .get_maintainer.conf file and use upstream a lot more closely as it now has logic to find all MAINTAINERS files in a tree.

But this change isn't upstream. Please work with Joe Perches upstream to get this change accepted and it'll flow down to us and not get overwritten when I forget it was an intentional change :) Thanks!

Signature · 1 line
Tom
#2 lore raw

Hi Tom,

Quoted 28 lines · Tom Rini
Quoted 13 lines · Trevor Woerner

If the user creates a .get_maintainer.ignore file, make sure it is consulted and obeyed for *all* emails discovered by the script.

---
 scripts/get_maintainer.pl | 1 +
 1 file changed, 1 insertion(+)
scripts/get_maintainer.pl +0 -0
index e3b41616c9..8c0fb8656e 100755

scripts/get_maintainer.pl sub merge_email { · line 2441

Quoted 7 lines
scripts/get_maintainer.pl +1 -0
@@ -2435,6 +2435,7 @@ sub merge_email {
 
     for (@_) {
 	my ($address, $role) = @$_;
+	next if (ignore_email_address($address));
 	if (!$saw{$address}) {
 	    if ($output_roles) {
 		push(@lines, "$address ($role)");

This got me to check and see that yes, our copy of get_maintainers.pl is out of date from Linux. And in fact, a re-sync will let us add a .get_maintainer.conf file and use upstream a lot more closely as it now has logic to find all MAINTAINERS files in a tree.

Quoted 3 lines

But this change isn't upstream. Please work with Joe Perches upstream to get this change accepted and it'll flow down to us and not get overwritten when I forget it was an intentional change :) Thanks!

Thanks for the tip!

I ran my patches through the kernel's latest get_maintainer.pl script and it correctly removes email entries that are listed in my ~/.get_maintainer.ignore file without any changes required. Therefore a re-sync would appear to fix the issue I found.

I can take a look at the re-sync if you wish? It's unclear to me whether you're looking into the re-sync or not.

Best regards,
Trevor

#3 lore raw
Quoted 37 lines · Trevor Woerner

Hi Tom,

Quoted 28 lines · Tom Rini
Quoted 13 lines · Trevor Woerner

If the user creates a .get_maintainer.ignore file, make sure it is consulted and obeyed for *all* emails discovered by the script.

---
 scripts/get_maintainer.pl | 1 +
 1 file changed, 1 insertion(+)
scripts/get_maintainer.pl +0 -0
index e3b41616c9..8c0fb8656e 100755

scripts/get_maintainer.pl sub merge_email { · line 2441

Quoted 7 lines
scripts/get_maintainer.pl +1 -0
@@ -2435,6 +2435,7 @@ sub merge_email {
 
     for (@_) {
 	my ($address, $role) = @$_;
+	next if (ignore_email_address($address));
 	if (!$saw{$address}) {
 	    if ($output_roles) {
 		push(@lines, "$address ($role)");

This got me to check and see that yes, our copy of get_maintainers.pl is out of date from Linux. And in fact, a re-sync will let us add a .get_maintainer.conf file and use upstream a lot more closely as it now has logic to find all MAINTAINERS files in a tree.

Quoted 3 lines

But this change isn't upstream. Please work with Joe Perches upstream to get this change accepted and it'll flow down to us and not get overwritten when I forget it was an intentional change :) Thanks!

Thanks for the tip!

Quoted 7 lines

I ran my patches through the kernel's latest get_maintainer.pl script and it correctly removes email entries that are listed in my ~/.get_maintainer.ignore file without any changes required. Therefore a re-sync would appear to fix the issue I found.

I can take a look at the re-sync if you wish? It's unclear to me whether you're looking into the re-sync or not.

Please do. I took a quick attempt at it, but I couldn't convince it to use all of our MAINTAINERS files, by default, for some reason. Thanks!

Signature · 1 line
Tom