]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
get_maintainer: Improve patch recognition
authorJoe Perches <joe@perches.com>
Tue, 18 Jun 2019 11:12:15 +0000 (11:12 +0000)
committerJulien Grall <julien.grall@arm.com>
Tue, 9 Jul 2019 14:15:24 +0000 (15:15 +0100)
There are mode change and rename only patches that are unrecognized
by the get_maintainer.pl script.

Recognize them.

[ Linux commit 0455c74788fd5aad4399f00e3fbbb7e87450ca58 ]

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
CC: Julien Grall <julien.grall@arm.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Acked-by: Julien Grall <julien.grall@arm.com>
scripts/get_maintainer.pl

index d528da738c6c7329d886afe630b2bb64315ff4e0..174dfb7e409d18563d010b5b8a48c8073a7a3200 100755 (executable)
@@ -445,7 +445,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;
                if ($1 ne "/dev/null") { #Ignore the no-file placeholder
                    $filename =~ s@^[^/]*/@@;