All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] get_maintainer: Quiet noisy implicit -f vcs_file_exists checking
@ 2016-08-11 22:46 Joe Perches
  2016-08-12  8:17 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2016-08-11 22:46 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Wolfram Sang, Linus Torvalds, linux-kernel

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: 4cad35a7ca69 ("get_maintainer.pl: reduce need for command-line option -f")
Reported-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/get_maintainer.pl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 49a00d5..aed4511 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -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;
 }
 
-- 
2.8.0.rc4.16.g56331f8

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] get_maintainer: Quiet noisy implicit -f vcs_file_exists checking
  2016-08-11 22:46 [PATCH] get_maintainer: Quiet noisy implicit -f vcs_file_exists checking Joe Perches
@ 2016-08-12  8:17 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2016-08-12  8:17 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andrew Morton, Linus Torvalds, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

On Thu, Aug 11, 2016 at 03:46:03PM -0700, Joe Perches wrote:
> 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: 4cad35a7ca69 ("get_maintainer.pl: reduce need for command-line option -f")
> Reported-by: Wolfram Sang <wsa@the-dreams.de>
> Signed-off-by: Joe Perches <joe@perches.com>

Tested-by: Wolfram Sang <wsa@the-dreams.de>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-12  8:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-11 22:46 [PATCH] get_maintainer: Quiet noisy implicit -f vcs_file_exists checking Joe Perches
2016-08-12  8:17 ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.