get_maintainer: very noisy since '-f' is optional
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
Joe Perches
maintainerQuoted 1 line · Wolfram Sang
Hi Joe,
Hi Wolfram.
One of my favorite xkcd comics: https://xkcd.com/1172/
Quoted 8 lines
commit
4cad35a7ca690eabf0d241062ce9e59693ec03e7("get_maintainer.pl:
reduce need for command-line option -f") makes my scripts very noisy.I regularly use
get_maintainerto create CC lists for patch series generated with coccinelle. These patch series are stored outside my Linux git repo. Now I get for everyvcs_file_exists()a warning from git-ls-files:
Quoted 5 lines
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 repositoryGit version 2.8.1 here.
Can you take care of that?
Maybe this?
scripts/get_maintainer.pl +0 -0
@@ -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;
}
Quoted 2 lines
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 ;)
Quoted 1 line
Maybe this?
Seems to work. Thanks!