aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2018-06-07 20:10:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-07 20:34:39 -0400
commit0455c74788fd5aad4399f00e3fbbb7e87450ca58 (patch)
tree9a677b1dd6a48219268b02f5f6b2cd7594e9a50e /scripts
parent401c636a0eeb0d51862fce222da1bf08e3a0ffd0 (diff)
get_maintainer: improve patch recognition
There are mode change and rename only patches that are unrecognized by the get_maintainer.pl script. Recognize them. Link: http://lkml.kernel.org/r/bf63101a908d0ff51948164aa60e672368066186.1526949367.git.joe@perches.com Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/get_maintainer.pl13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 30eca36b4dad..c87fa734e3e1 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -542,7 +542,18 @@ foreach my $file (@ARGV) {
542 542
543 while (<$patch>) { 543 while (<$patch>) {
544 my $patch_line = $_; 544 my $patch_line = $_;
545 if (m/^\+\+\+\s+(\S+)/ or m/^---\s+(\S+)/) { 545 if (m/^ mode change [0-7]+ => [0-7]+ (\S+)\s*$/) {
546 my $filename = $1;
547 push(@files, $filename);
548 } elsif (m/^rename (?:from|to) (\S+)\s*$/) {
549 my $filename = $1;
550 push(@files, $filename);
551 } elsif (m/^diff --git a\/(\S+) b\/(\S+)\s*$/) {
552 my $filename1 = $1;
553 my $filename2 = $2;
554 push(@files, $filename1);
555 push(@files, $filename2);
556 } elsif (m/^\+\+\+\s+(\S+)/ or m/^---\s+(\S+)/) {
546 my $filename = $1; 557 my $filename = $1;
547 $filename =~ s@^[^/]*/@@; 558 $filename =~ s@^[^/]*/@@;
548 $filename =~ s@\n@@; 559 $filename =~ s@\n@@;