mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christopher Covington <cov@codeaurora.org>
To: Joe Perches <joe@perches.com>, Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] get_maintainer: Don't check if STDIN exists in a VCS repository
Date: Wed, 10 Aug 2016 14:38:56 -0400	[thread overview]
Message-ID: <3ea1a8e5-c472-4e5e-d177-03c12e282475@codeaurora.org> (raw)
In-Reply-To: <f8910b64c4987753a642b0200f5509ea7d8bd818.1470843485.git.joe@perches.com>

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 <cov@codeaurora.org>
> Signed-off-by: Joe Perches <joe@perches.com>

Thanks Joe, that fixes it!

Tested-by: Christopher Covington <cov@codeaurora.org>

> ---
>  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.

      reply	other threads:[~2016-08-10 18:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-10 15:45 Joe Perches
2016-08-10 18:38 ` Christopher Covington [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ea1a8e5-c472-4e5e-d177-03c12e282475@codeaurora.org \
    --to=cov@codeaurora.org \
    --cc=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®