提交 0455c747 编写于 作者: J Joe Perches 提交者: Linus Torvalds

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.comSigned-off-by: NJoe Perches <joe@perches.com>
Reported-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 401c636a
...@@ -542,7 +542,18 @@ foreach my $file (@ARGV) { ...@@ -542,7 +542,18 @@ foreach my $file (@ARGV) {
while (<$patch>) { while (<$patch>) {
my $patch_line = $_; 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; my $filename = $1;
$filename =~ s@^[^/]*/@@; $filename =~ s@^[^/]*/@@;
$filename =~ s@\n@@; $filename =~ s@\n@@;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册