Commit 8582fb59 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

get_maintainer: quiet noisy implicit -f vcs_file_exists checking

Checking command line filenames that are outside the git tree can emit a
noisy and confusing message.

Quiet that message by redirecting stderr.
Verify that the command was executed successfully.

Fixes: 4cad35a7 (" reduce need for command-line option -f")
Link: default avatarJoe Perches <>
Reported-by: default avatarWolfram Sang <>
Tested-by: default avatarWolfram Sang <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 101b29a2
......@@ -2136,9 +2136,11 @@ sub vcs_file_exists {
my $cmd = $VCS_cmds{"file_exists_cmd"};
$cmd =~ s/(\$\w+)/$1/eeg; # interpolate $cmd
$cmd .= " 2>&1";
$exists = &{$VCS_cmds{"execute_cmd"}}($cmd);
return 0 if ($? != 0);
return $exists;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment