Skip to content

Commit aec742e

Browse files
JoePerchestorvalds
authored andcommitted
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: 4cad35a ("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>
1 parent a0cba21 commit aec742e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/get_maintainer.pl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ sub read_mailmap {
432432
die "$P: file '${file}' not found\n";
433433
}
434434
}
435-
if ($from_filename || vcs_file_exists($file)) {
435+
if ($from_filename || ($file ne "&STDIN" && vcs_file_exists($file))) {
436436
$file =~ s/^\Q${cur_path}\E//; #strip any absolute path
437437
$file =~ s/^\Q${lk_path}\E//; #or the path to the lk tree
438438
push(@files, $file);

0 commit comments

Comments
 (0)