From 882ea1d64eb3956f7d877bcbc6370bd3c6d81543 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Thu, 7 Jun 2018 17:04:33 -0700 Subject: scripts: use SPDX tag in get_maintainer and checkpatch Add the appropriate SPDX tag to these scripts. Miscellanea: o Add my copyright to checkpatch Link: http://lkml.kernel.org/r/d08e49e8f6562c58a63792aa64306d1851f81f4b.camel@perches.com Signed-off-by: Joe Perches Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/get_maintainer.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/get_maintainer.pl') diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 99c96e86eccb6..30eca36b4dad5 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 # created from checkpatch.pl # @@ -7,8 +9,6 @@ # # usage: perl scripts/get_maintainer.pl [OPTIONS] # perl scripts/get_maintainer.pl [OPTIONS] -f -# -# Licensed under the terms of the GNU GPL License version 2 use warnings; use strict; -- cgit v1.2.3 From 0455c74788fd5aad4399f00e3fbbb7e87450ca58 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Thu, 7 Jun 2018 17:10:38 -0700 Subject: 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: Joe Perches Reported-by: Heinrich Schuchardt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/get_maintainer.pl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'scripts/get_maintainer.pl') diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 30eca36b4dad5..c87fa734e3e19 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -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@@; -- cgit v1.2.3