Skip to content

Commit

Permalink
scripts/get_maintainer.pl: handle file names beginning with ./
Browse files Browse the repository at this point in the history
The problem is that get_maintainer.pl doesn't work if you have a ./
prefix on the filename.  For example, if you type:

  ./scripts/get_maintainer.pl -f ./drivers/usb/usb-skeleton.c

then the current code only includes LKML and people from the git log, it
doesn't include Greg or the linux-usb list.

Reported-by: Dan Carpenter <[email protected]>
Cc: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
JoePerches authored and torvalds committed Jan 21, 2016
1 parent 75339d8 commit be17bdd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/get_maintainer.pl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
my $V = '0.26';

use Getopt::Long qw(:config no_auto_abbrev);
use Cwd;

my $cur_path = fastgetcwd() . '/';
my $lk_path = "./";
my $email = 1;
my $email_usename = 1;
Expand Down Expand Up @@ -429,6 +431,8 @@ sub read_mailmap {
}
}
if ($from_filename) {
$file =~ s/^\Q${cur_path}\E//; #strip any absolute path
$file =~ s/^\Q${lk_path}\E//; #or the path to the lk tree
push(@files, $file);
if ($file ne "MAINTAINERS" && -f $file && ($keywords || $file_emails)) {
open(my $f, '<', $file)
Expand Down

0 comments on commit be17bdd

Please sign in to comment.