Commit 6be0710cfe7325be72c72cde702318b983b450a9

Authored by Geert Uytterhoeven
Committed by Linus Torvalds
1 parent 36d308d8b5

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: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

scripts/get_maintainer.pl
... ... @@ -433,7 +433,7 @@
433 433  
434 434 while (<$patch>) {
435 435 my $patch_line = $_;
436   - if (m/^\+\+\+\s+(\S+)/) {
  436 + if (m/^\+\+\+\s+(\S+)/ or m/^---\s+(\S+)/) {
437 437 my $filename = $1;
438 438 $filename =~ s@^[^/]*/@@;
439 439 $filename =~ s@\n@@;