Commit 6be0710c authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

get_maintainer.pl: find maintainers for removed files

For removed files, get_maintainer.pl doesn't find any maintainers (besides
the default linux-kernel@vger.kernel.org), 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
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 36d308d8
...@@ -433,7 +433,7 @@ foreach my $file (@ARGV) { ...@@ -433,7 +433,7 @@ foreach my $file (@ARGV) {
while (<$patch>) { while (<$patch>) {
my $patch_line = $_; my $patch_line = $_;
if (m/^\+\+\+\s+(\S+)/) { if (m/^\+\+\+\s+(\S+)/ or m/^---\s+(\S+)/) {
my $filename = $1; my $filename = $1;
$filename =~ s@^[^/]*/@@; $filename =~ s@^[^/]*/@@;
$filename =~ s@\n@@; $filename =~ s@\n@@;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment