From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753180AbcHJSPt (ORCPT ); Wed, 10 Aug 2016 14:15:49 -0400 Received: from smtprelay0145.hostedemail.com ([216.40.44.145]:34744 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932449AbcHJSPm (ORCPT ); Wed, 10 Aug 2016 14:15:42 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:305:355:379:541:800:960:973:982:988:989:1260:1345:1437:1534:1541:1711:1730:1747:1777:1792:2393:2559:2562:2915:3138:3139:3140:3141:3142:3352:3653:3865:3867:3868:3871:4250:4321:5007:6119:6120:6261:6299:7901:7903:10004:10848:11026:11658:11914:12296:12517:12519:12555:12679:13069:13161:13221:13229:13311:13357:14181:14384:14394:14721:21080:21451,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:3,LUA_SUMMARY:none X-HE-Tag: cream29_84e91d250a14c X-Filterd-Recvd-Size: 1791 From: Joe Perches To: Andrew Morton Cc: Christopher Covington , Linus Torvalds , linux-kernel@vger.kernel.org Subject: [PATCH] get_maintainer: Don't check if STDIN exists in a VCS repository Date: Wed, 10 Aug 2016 08:45:11 -0700 Message-Id: X-Mailer: git-send-email 2.8.0.rc4.16.g56331f8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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); -- 2.8.0.rc4.16.g56331f8