Skip to content

Commit

Permalink
get_maintainer: quiet noisy implicit -f vcs_file_exists checking
Browse files Browse the repository at this point in the history
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: 4cad35a ("get_maintainer.pl: reduce need for command-line option -f")
Link: http://lkml.kernel.org/r/1970a1d2fecb258e384e2e4fdaacdc9ccf3e30a4.1470955439.git.joe@perches.com
Signed-off-by: Joe Perches <[email protected]>
Reported-by: Wolfram Sang <[email protected]>
Tested-by: Wolfram Sang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
JoePerches authored and torvalds committed Aug 27, 2016
1 parent 101b29a commit 8582fb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/get_maintainer.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 8582fb5

Please sign in to comment.