]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
get_maintainers.pl: Avoid THE_REST when files are added or removed
authorAlan Robinson <Alan.Robinson@ts.fujitsu.com>
Fri, 23 Feb 2018 13:24:56 +0000 (14:24 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 23 Feb 2018 13:24:56 +0000 (14:24 +0100)
When files are added or removed /dev/null is used as a place
holder name in the patch for the absent file.  Don't try and
find a MAINTAINER for this place holder, it only ever flags
and then spams THE REST, behaviour for a real filename is
unchanged.

Signed-off-by: Alan Robinson <Alan.Robinson@ts.fujitsu.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
scripts/get_maintainer.pl

index 0ce2d367fa48977233c2b39e2a5f6886c4e32462..3fb1ad4b694d68d5f90ad642420d4b50b934ed2b 100755 (executable)
@@ -444,10 +444,12 @@ foreach my $file (@ARGV) {
            my $patch_line = $_;
            if (m/^\+\+\+\s+(\S+)/ or m/^---\s+(\S+)/) {
                my $filename = $1;
-               $filename =~ s@^[^/]*/@@;
-               $filename =~ s@\n@@;
-               $lastfile = $filename;
-               push(@files, $filename);
+               if ($1 ne "/dev/null") { #Ignore the no-file placeholder
+                   $filename =~ s@^[^/]*/@@;
+                   $filename =~ s@\n@@;
+                   $lastfile = $filename;
+                   push(@files, $filename);
+               }
                $patch_prefix = "^[+-].*";      #Now parsing the actual patch
            } elsif (m/^\@\@ -(\d+),(\d+)/) {
                if ($email_git_blame) {