[PATCH] get_maintainer.pl: Find maintainers for removed files

From: Geert Uytterhoeven
Date: Fri Dec 28 2012 - 14:27:52 EST


For removed files, get_maintainer.pl doesn't find any maintainers (besides
the default linux-kernel@xxxxxxxxxxxxxxx), 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@xxxxxxxxxxxxxx>
---
scripts/get_maintainer.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 8b673dd..18d4ab5 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -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@@;
--
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/