summaryrefslogtreecommitdiffstats
path: root/scripts/get_maintainer.pl
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2016-08-10 08:45:11 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-10 10:42:00 -0700
commitaec742e8e1cf05114530bdef8051238b6dbb4052 (patch)
tree558f9c961b03ec47153adac4737c351c2373b48a /scripts/get_maintainer.pl
parenta0cba2179ea4c1820fce2ee046b6ed90ecc56196 (diff)
downloadlinux-aec742e8e1cf05114530bdef8051238b6dbb4052.tar.bz2
get_maintainer: Don't check if STDIN exists in a VCS repository
If get_maintainer is not given any filename arguments on the command line, the standard input is read for a patch. But checking if a VCS has a file named &STDIN is not a good idea and fails. Verify the nominal input file is not &STDIN before checking the VCS. Fixes: 4cad35a7ca69 ("get_maintainer.pl: reduce need for command-line option -f") Reported-by: Christopher Covington <cov@codeaurora.org> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/get_maintainer.pl')
-rwxr-xr-xscripts/get_maintainer.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 122fcdaf42c8..49a00d54b835 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -432,7 +432,7 @@ foreach my $file (@ARGV) {
die "$P: file '${file}' not found\n";
}
}
- if ($from_filename || vcs_file_exists($file)) {
+ if ($from_filename || ($file ne "&STDIN" && vcs_file_exists($file))) {
$file =~ s/^\Q${cur_path}\E//; #strip any absolute path
$file =~ s/^\Q${lk_path}\E//; #or the path to the lk tree
push(@files, $file);