Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0455c747 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

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: default avatarJoe Perches <joe@perches.com>
Reported-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 401c636a
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -542,7 +542,18 @@ foreach my $file (@ARGV) {

	while (<$patch>) {
	    my $patch_line = $_;
	    if (m/^\+\+\+\s+(\S+)/ or m/^---\s+(\S+)/) {
	    if (m/^ mode change [0-7]+ => [0-7]+ (\S+)\s*$/) {
		my $filename = $1;
		push(@files, $filename);
	    } elsif (m/^rename (?:from|to) (\S+)\s*$/) {
		my $filename = $1;
		push(@files, $filename);
	    } elsif (m/^diff --git a\/(\S+) b\/(\S+)\s*$/) {
		my $filename1 = $1;
		my $filename2 = $2;
		push(@files, $filename1);
		push(@files, $filename2);
	    } elsif (m/^\+\+\+\s+(\S+)/ or m/^---\s+(\S+)/) {
		my $filename = $1;
		$filename =~ s@^[^/]*/@@;
		$filename =~ s@\n@@;