From: Joe Perches Date: Wed, 10 Aug 2016 15:45:11 +0000 (-0700) Subject: get_maintainer: Don't check if STDIN exists in a VCS repository X-Git-Tag: v4.14-rc1~2663 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aec742e8e1cf05114530bdef8051238b6dbb4052;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Joe Perches Signed-off-by: Linus Torvalds --- diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 122fcda..49a00d5 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);