Skip to contentSkip to conversation

get_maintainers.pl: Avoid THE_REST when files are added or removed

PATCH Superseded Alan Robinson 3 participants 6 messages Feb 22, 2018 GET_MAINTAINER script

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 get_maintainers.pl: Avoid THE_REST when files are added or removed

When files are added or removed /dev/null is used as a place holder name in the patch for the absent file. Don't try and find a MAINTAINER for this place holder, it only ever flags and then spams THE REST.

---

Tested by pretending to remove xen/common/cpupool.c for which get_maintainers.pl currently flags 11 addresses, after this patch only xen-devel and its two maintainers (Juergen and Dario) get listed...

 scripts/get_maintainer.pl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
scripts/get_maintainer.pl +3 -1
index 0ce2d367fa..277ba17a67 100755
@@ -447,7 +447,9 @@ foreach my $file (@ARGV) {
 		$filename =~ s@^[^/]*/@@;
 		$filename =~ s@\n@@;
 		$lastfile = $filename;
-		push(@files, $filename);
+		if ($filename ne "dev/null") { #Ignore the no-file placeholder
+		     push(@files, $filename);
+		}
 		$patch_prefix = "^[+-].*";	#Now parsing the actual patch
 	    } elsif (m/^\@\@ -(\d+),(\d+)/) {
 		if ($email_git_blame) {
Signature · 6 lines
2.14.1

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 22.02.18 at 10:09, <[email protected]> wrote:

When files are added or removed /dev/null is used as a place holder name in the patch for the absent file. Don't try and find a MAINTAINER for this place holder, it only ever flags and then spams THE REST.

When a file is added, it falls under THE REST maintainership unless there's a pattern already in place covering the file, or a new entry is being added at the same time. When a file is removed, whoever was its maintainer should be Cc-ed. So perhaps it's rather the /dev/null placeholder use that's wrong?

Also, please send patches _to_ the list, _cc_-ing individuals as needed.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw

Hi Jan,

Quoted 10 lines · Jan Beulich

From: Jan Beulich <[email protected]>
Subject: Re: [PATCH] get_maintainers.pl: Avoid THE_REST when files are
added or removed

Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 22.02.18 at 10:09, <[email protected]> wrote:

When files are added or removed /dev/null is used as a place holder name in the patch for the absent file. Don't try and find a MAINTAINER for this place holder, it only ever flags and then spams THE REST.

Quoted 5 lines

When a file is added, it falls under THE REST maintainership unless there's a pattern already in place covering the file, or a new entry is being added at the same time. When a file is removed, whoever was its maintainer should be Cc-ed. So perhaps it's rather the /dev/null placeholder use that's wrong?

Exactly - that what this patch tries to do...

get_maintainers.pl collects filename from the '+++' and '---' lines. A normal (not add/remove) patch looks like this:

scripts/get_maintainer.pl +0 -0
index 0ce2d367fa..277ba17a67 100755

An add/delete patch looks like this:

xen/common/cpupool.c deleted +0 -0
deleted file mode 100644
index 999839444e..0000000000

Here get_maintainers.pl finds two files, change _just_ ignores the dev/null.

Quoted 3 lines

Also, please send patches _to_ the list, _cc_-ing individuals as needed.

Ahh..sorry about that

Alan

Signature · 14 lines
Alan Robinson
Enterprise Platform Services, Germany

Fujitsu
Mies-van-der-Rohe-Str. 8, 80807 Muenchen, Deutschland
Tel.: +49 (89) 62060 3927
Mob.: +49 (172) 8512843
E-Mail: [email protected]
Web: http://www.fujitsu.com/de/

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#3 lore raw
Quoted 35 lines
Quoted 1 line
Quoted 1 line · On 22.02.18 at 10:27, <[email protected]> wrote:
Quoted 10 lines · Jan Beulich

From: Jan Beulich <[email protected]>
Subject: Re: [PATCH] get_maintainers.pl: Avoid THE_REST when files are
added or removed

Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 22.02.18 at 10:09, <[email protected]> wrote:

When files are added or removed /dev/null is used as a place holder name in the patch for the absent file. Don't try and find a MAINTAINER for this place holder, it only ever flags and then spams THE REST.

Quoted 5 lines

When a file is added, it falls under THE REST maintainership unless there's a pattern already in place covering the file, or a new entry is being added at the same time. When a file is removed, whoever was its maintainer should be Cc-ed. So perhaps it's rather the /dev/null placeholder use that's wrong?

Exactly - that what this patch tries to do...

get_maintainers.pl collects filename from the '+++' and '---' lines. A normal (not add/remove) patch looks like this:

scripts/get_maintainer.pl +0 -0
index 0ce2d367fa..277ba17a67 100755

An add/delete patch looks like this:

xen/common/cpupool.c deleted +0 -0
deleted file mode 100644
index 999839444e..0000000000
Quoted 2 lines

Here get_maintainers.pl finds two files, change _just_ ignores the dev/null.

Oh, I see - it's the file name collection code you change, not the consuming side, I'm sorry for the noise. However, isn't omitting the leading / a potential problem then? While it's not very likely for us to gain ./dev/null, it's also not entirely impossible. Furthermore, shouldn't you move the setting of $lastfile into the conditional as well?

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#4 lore raw

Hi Jan,

Quoted 3 lines · Jan Beulich

Oh, I see - it's the file name collection code you change, not the consuming side, I'm sorry for the noise. However, isn't omitting the leading / a potential problem then?

The leading / is stripped away several lines before this..

Quoted 2 lines

While it's not
very likely for us to gain ./dev/null, it's also not entirely impossible.

True and this change does mean that get_maintainer.pl would fail to recognise such a patch as a patch..(just tried)

Quoted 2 lines

Furthermore, shouldn't you move the setting of $lastfile into the conditional as well?

Let me send a second version....

Alan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#5 lore raw
In reply to Jan Beulich

Jan Beulich writes ("Re: [PATCH] get_maintainers.pl: Avoid THE_REST when files are added or removed"):

Quoted 5 lines · On 22.02.18 at 10:27, <[email protected]> wrote:

Oh, I see - it's the file name collection code you change, not the consuming side, I'm sorry for the noise. However, isn't omitting the leading / a potential problem then? While it's not very likely for us to gain ./dev/null, it's also not entirely impossible.

If we gain ./dev/null it is because it was a morning in very early April and whoever acked it and committed it hadn't had enough coffee.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel