From: Joe Perches Date: Fri, 16 Oct 2020 03:10:34 +0000 (-0700) Subject: get_maintainer: add test for file in VCS X-Git-Tag: v5.10-rc1~106^2~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cdfe2d22047661c5e0ecf8f28e7e8843ee177aff;p=thirdparty%2Fkernel%2Flinux.git get_maintainer: add test for file in VCS It's somewhat common for me to ask get_maintainer to tell me who maintains a patch file rather than the files modified by the patch. Emit a warning if using get_maintainer.pl -f Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/f63229c051567041819f25e76f49d83c6e4c0f71.camel@perches.com Signed-off-by: Linus Torvalds --- diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 484d2fbf5921d..5a36354a38cc3 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -541,6 +541,9 @@ foreach my $file (@ARGV) { die "$P: file '${file}' not found\n"; } } + if ($from_filename && (vcs_exists() && !vcs_file_exists($file))) { + warn "$P: file '$file' not found in version control $!\n"; + } if ($from_filename || ($file ne "&STDIN" && vcs_file_exists($file))) { $file =~ s/^\Q${cur_path}\E//; #strip any absolute path $file =~ s/^\Q${lk_path}\E//; #or the path to the lk tree