* [PATCH v2 ] get_maintainers.pl: Avoid THE_REST when files are added or removed
@ 2018-02-22 11:12 Alan Robinson
2018-02-23 9:53 ` Jan Beulich
2018-02-23 11:02 ` Ian Jackson
0 siblings, 2 replies; 3+ messages in thread
From: Alan Robinson @ 2018-02-22 11:12 UTC (permalink / raw)
To: xen-devel
Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
Ian Jackson, Tim Deegan, Jan Beulich
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, behaviour for a real filename is
unchanged.
Signed-off-by: Alan Robinson <Alan.Robinson@ts.fujitsu.com>
---
v1 - original version
v2 - addresses /dev/null and $lastfile comments from Jan
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.
Also tested adding a 'dev/null' file which get_maintainer.pl now
accepts and suggests 'THE_REST'.
scripts/get_maintainer.pl | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 0ce2d367fa..3fb1ad4b69 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -444,10 +444,12 @@ foreach my $file (@ARGV) {
my $patch_line = $_;
if (m/^\+\+\+\s+(\S+)/ or m/^---\s+(\S+)/) {
my $filename = $1;
- $filename =~ s@^[^/]*/@@;
- $filename =~ s@\n@@;
- $lastfile = $filename;
- push(@files, $filename);
+ if ($1 ne "/dev/null") { #Ignore the no-file placeholder
+ $filename =~ s@^[^/]*/@@;
+ $filename =~ s@\n@@;
+ $lastfile = $filename;
+ push(@files, $filename);
+ }
$patch_prefix = "^[+-].*"; #Now parsing the actual patch
} elsif (m/^\@\@ -(\d+),(\d+)/) {
if ($email_git_blame) {
--
2.14.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 ] get_maintainers.pl: Avoid THE_REST when files are added or removed
2018-02-22 11:12 [PATCH v2 ] get_maintainers.pl: Avoid THE_REST when files are added or removed Alan Robinson
@ 2018-02-23 9:53 ` Jan Beulich
2018-02-23 11:02 ` Ian Jackson
1 sibling, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2018-02-23 9:53 UTC (permalink / raw)
To: Alan.Robinson
Cc: Tim Deegan, Stefano Stabellini, Wei Liu, George Dunlap,
Andrew Cooper, Ian Jackson, xen-devel
>>> On 22.02.18 at 12:12, <Alan.Robinson@ts.fujitsu.com> 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, behaviour for a real filename is
> unchanged.
>
> Signed-off-by: Alan Robinson <Alan.Robinson@ts.fujitsu.com>
FTR - looks fine to me, but I wouldn't want to put this in without
someone with more Perl knowledge having given their okay.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 ] get_maintainers.pl: Avoid THE_REST when files are added or removed
2018-02-22 11:12 [PATCH v2 ] get_maintainers.pl: Avoid THE_REST when files are added or removed Alan Robinson
2018-02-23 9:53 ` Jan Beulich
@ 2018-02-23 11:02 ` Ian Jackson
1 sibling, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2018-02-23 11:02 UTC (permalink / raw)
To: Alan.Robinson
Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
Tim Deegan, xen-devel, Jan Beulich
Alan Robinson writes ("[PATCH v2 ] 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, behaviour for a real filename is
> unchanged.
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
I have reviewed (but not tested) the Perl and it LGTM.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-23 11:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-22 11:12 [PATCH v2 ] get_maintainers.pl: Avoid THE_REST when files are added or removed Alan Robinson
2018-02-23 9:53 ` Jan Beulich
2018-02-23 11:02 ` Ian Jackson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.