All of lore.kernel.org
 help / color / mirror / Atom feed
* [REGRESSION] get_maintainer: very noisy since '-f' is optional
@ 2016-08-11 20:14 Wolfram Sang
  2016-08-11 20:40 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2016-08-11 20:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: Joe Perches

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

Hi Joe,

commit 4cad35a7ca690eabf0d241062ce9e59693ec03e7 ("get_maintainer.pl:
reduce need for command-line option -f") makes my scripts very noisy.

I regularly use get_maintainer to create CC lists for patch series
generated with coccinelle. These patch series are stored outside my
Linux git repo. Now I get for every vcs_file_exists() a warning from
git-ls-files:

fatal: /home/wsa/Kernel/string-refactor/usb_alloc_urb/patches/sound/usb/0001-ALSA-usb-caiaq-audio-don-t-print-error-when-allocati.patch: '/home/wsa/Kernel/string-refactor/usb_alloc_urb/patches/sound/usb/0001-ALSA-usb-caiaq-audio-don-t-print-error-when-allocati.patch' is outside repository

Git version 2.8.1 here.

Can you take care of that?

Thanks,

   Wolfram


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

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

* Re: [REGRESSION] get_maintainer: very noisy since '-f' is optional
  2016-08-11 20:14 [REGRESSION] get_maintainer: very noisy since '-f' is optional Wolfram Sang
@ 2016-08-11 20:40 ` Joe Perches
  2016-08-11 20:53   ` Wolfram Sang
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2016-08-11 20:40 UTC (permalink / raw)
  To: Wolfram Sang, linux-kernel

On Thu, 2016-08-11 at 22:14 +0200, Wolfram Sang wrote:
> Hi Joe,

Hi Wolfram.

One of my favorite xkcd comics: https://xkcd.com/1172/

> commit 4cad35a7ca690eabf0d241062ce9e59693ec03e7 ("get_maintainer.pl:
> reduce need for command-line option -f") makes my scripts very noisy.

> I regularly use get_maintainer to create CC lists for patch series
> generated with coccinelle. These patch series are stored outside my
> Linux git repo. Now I get for every vcs_file_exists() a warning from
> git-ls-files:
> 
> fatal: /home/wsa/Kernel/string-refactor/usb_alloc_urb/patches/sound/usb/0001-ALSA-usb-caiaq-audio-don-t-print-error-when-allocati.patch: '/home/wsa/Kernel/string-refactor/usb_alloc_urb/patches/sound/usb/0001-ALSA-usb-caiaq-audio-don-t-print-error-when-allocati.patch' is outside repository
> 
> Git version 2.8.1 here.
> 
> Can you take care of that?

Maybe this?

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;
 }
 

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

* Re: [REGRESSION] get_maintainer: very noisy since '-f' is optional
  2016-08-11 20:40 ` Joe Perches
@ 2016-08-11 20:53   ` Wolfram Sang
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2016-08-11 20:53 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel

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


> One of my favorite xkcd comics: https://xkcd.com/1172/

Yes, a good one. I hope my usecase of checking patches outside the repo
is not as esoteric, though ;)

> Maybe this?

Seems to work. Thanks!


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

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

end of thread, other threads:[~2016-08-11 20:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-11 20:14 [REGRESSION] get_maintainer: very noisy since '-f' is optional Wolfram Sang
2016-08-11 20:40 ` Joe Perches
2016-08-11 20:53   ` 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.