aboutsummaryrefslogtreecommitdiff
path: root/scripts/get_maintainer.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/get_maintainer.pl')
-rwxr-xr-xscripts/get_maintainer.pl17
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 99c96e86eccb..c87fa734e3e1 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -1,4 +1,6 @@
#!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
+#
# (c) 2007, Joe Perches <joe@perches.com>
# created from checkpatch.pl
#
@@ -7,8 +9,6 @@
#
# usage: perl scripts/get_maintainer.pl [OPTIONS] <patch>
# perl scripts/get_maintainer.pl [OPTIONS] -f <file>
-#
-# Licensed under the terms of the GNU GPL License version 2
use warnings;
use strict;
@@ -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@@;