Skip to contentSkip to conversation

get_maintainer.pl: Find maintainers for removed files

PATCH In review Geert Uytterhoeven 3 participants 4 messages Dec 28, 2012 GET_MAINTAINER script

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 get_maintainer.pl: Find maintainers for removed files

For removed files, get_maintainer.pl doesn't find any maintainers (besides the default [email protected]), as it only looks at the "+++" lines, which are "/dev/null" for removals.
Fix this by extending the parsing to the "---" lines.

E.g. for the two line test patch below the real score maintainers will now be found:

    --- a/arch/score/include/asm/dma-mapping.h
    +++ /dev/null
---
 scripts/get_maintainer.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/get_maintainer.pl +1 -1
index 8b673dd..18d4ab5 100755
@@ -433,7 +433,7 @@ foreach my $file (@ARGV) {
 
 	while (<$patch>) {
 	    my $patch_line = $_;
-	    if (m/^\+\+\+\s+(\S+)/) {
+	    if (m/^\+\+\+\s+(\S+)/ or m/^---\s+(\S+)/) {
 		my $filename = $1;
 		$filename =~ s@^[^/]*/@@;
 		$filename =~ s@\n@@;
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 7 lines · Geert Uytterhoeven

For removed files, get_maintainer.pl doesn't find any maintainers (besides the default [email protected]), as it only looks at the "+++" lines, which are "/dev/null" for removals.
Fix this by extending the parsing to the "---" lines.

E.g. for the two line test patch below the real score maintainers will now be found:

*snort*

I'm afraid that finding anybody matching that description would reqiure a functioning time machine. AFAICT, arch/score has been orphaned for several years.

#2 lore raw
Quoted 6 lines · Al Viro
Quoted 5 lines · Geert Uytterhoeven

For removed files, get_maintainer.pl doesn't find any maintainers (besides the default [email protected]), as it only looks at the "+++" lines, which are "/dev/null" for removals.
Fix this by extending the parsing to the "---" lines.

Quoted 8 lines
Quoted 2 lines

E.g. for the two line test patch below the real score maintainers will now be found:

*snort*

I'm afraid that finding anybody matching that description would reqiure a functioning time machine. AFAICT, arch/score has been orphaned for several years.

;-)

Sorry, I meant the maintainers listed in MAINTAINERS.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

maintainer
#3 lore raw
In reply to Geert Uytterhoeven
Quoted 4 lines · Geert Uytterhoeven

For removed files, get_maintainer.pl doesn't find any maintainers (besides the default [email protected]), as it only looks at the "+++" lines, which are "/dev/null" for removals.
Fix this by extending the parsing to the "---" lines.

[]

scripts/get_maintainer.pl

Quoted 1 line
scripts/get_maintainer.pl +0 -0

[]

scripts/get_maintainer.pl foreach my $file (@ARGV) { · line 439

Quoted 9 lines
scripts/get_maintainer.pl +1 -1
@@ -433,7 +433,7 @@ foreach my $file (@ARGV) {
 
 	while (<$patch>) {
 	    my $patch_line = $_;
-	    if (m/^\+\+\+\s+(\S+)/) {
+	    if (m/^\+\+\+\s+(\S+)/ or m/^---\s+(\S+)/) {
 		my $filename = $1;
 		$filename =~ s@^[^/]*/@@;
 		$filename =~ s@\n@@;

OK, but this would now match any keyword in a deleted filename.