Skip to content

Commit

Permalink
get_maintainer: Don't check if STDIN exists in a VCS repository
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
JoePerches authored and torvalds committed Aug 10, 2016
1 parent a0cba21 commit aec742e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/get_maintainer.pl
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ sub read_mailmap {
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);
Expand Down

0 comments on commit aec742e

Please sign in to comment.