[patch] get_maintainer: handle file names beginning with ./

From: Dan Carpenter
Date: Fri Jan 08 2016 - 05:52:09 EST


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.

Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index cab641a..41cfe59 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -605,6 +605,8 @@ sub get_maintainers {

foreach my $file (@files) {

+ $file =~ s/^\.\///;
+
my %hash;
my $tvi = find_first_section();
while ($tvi < @typevalue) {