From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936059AbcHJSjB (ORCPT ); Wed, 10 Aug 2016 14:39:01 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:53175 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934132AbcHJSi7 (ORCPT ); Wed, 10 Aug 2016 14:38:59 -0400 Subject: Re: [PATCH] get_maintainer: Don't check if STDIN exists in a VCS repository To: Joe Perches , Andrew Morton References: Cc: Linus Torvalds , linux-kernel@vger.kernel.org From: Christopher Covington Message-ID: <3ea1a8e5-c472-4e5e-d177-03c12e282475@codeaurora.org> Date: Wed, 10 Aug 2016 14:38:56 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/10/2016 11:45 AM, Joe Perches wrote: > If get_maintainer is not given any filename arguments on the command line, > the standard input is read for a patch. > > But checking if a VCS has a file named &STDIN is not a good idea and fails. > > Verify the nominal input file is not &STDIN before checking the VCS. > > Fixes: 4cad35a7ca69 ("get_maintainer.pl: reduce need for command-line option -f") > Reported-by: Christopher Covington > Signed-off-by: Joe Perches Thanks Joe, that fixes it! Tested-by: Christopher Covington > --- > scripts/get_maintainer.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl > index 122fcda..49a00d5 100755 > --- a/scripts/get_maintainer.pl > +++ b/scripts/get_maintainer.pl > @@ -432,7 +432,7 @@ foreach my $file (@ARGV) { > die "$P: file '${file}' not found\n"; > } > } > - if ($from_filename || vcs_file_exists($file)) { > + 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 > push(@files, $file); > -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.