From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754607AbcAHKwG (ORCPT ); Fri, 8 Jan 2016 05:52:06 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:21959 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754531AbcAHKwE (ORCPT ); Fri, 8 Jan 2016 05:52:04 -0500 Date: Fri, 8 Jan 2016 13:51:55 +0300 From: Dan Carpenter To: Joe Perches Cc: linux-kernel@vger.kernel.org, Andrew Morton Subject: [patch] get_maintainer: handle file names beginning with ./ Message-ID: <20160108105155.GB32195@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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) {