Skip to content

Commit

Permalink
get_maintainer: add test for file in VCS
Browse files Browse the repository at this point in the history
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 <patchfile>

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
JoePerches authored and torvalds committed Oct 16, 2020
1 parent b7621eb commit cdfe2d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/get_maintainer.pl
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,9 @@ sub read_mailmap {
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
Expand Down

0 comments on commit cdfe2d2

Please sign in to comment.