From: Jonathan Nieder <jrnieder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Ramkumar Ramachandra <artagnon@gmail.com>
Subject: Re: [PATCH 3/3] send-email: use the three-arg form of open in recipients_cmd
Date: Sun, 31 Mar 2013 19:30:03 -0700 [thread overview]
Message-ID: <20130401023003.GD11704@elie.Belkin> (raw)
In-Reply-To: <1364780442-6015-3-git-send-email-gitster@pobox.com>
Junio C Hamano wrote:
> we cannot rewrite it to
>
> open my $fh, "-|", $cmd, $file;
>
> for extra safety. At least, by using this in the three-arg form:
>
> open my $fh, "-|", "$cmd \Q$file\E";
>
> we can silence Perlcritique, even though we do not gain much safety
> by doing so.
Yeah, I think this is the right thing to do.
This means that if some later code refactoring parses $tocmd once and
passes an array around, it would be easy to change this to
open my $fh, "-|", @$cmd, $file;
and there would be no temptation to do something involving pasting
@$cmd back together into a single string. Of course such a
refactoring is not very likely, but that kind of thing is a good
reason to prefer this style in general.
So for what it's worth, I like this patch.
next prev parent reply other threads:[~2013-04-01 2:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 12:39 [PATCH] git-send-email.perl: implement suggestions made by perlcritic Ramkumar Ramachandra
2013-03-21 15:29 ` Junio C Hamano
2013-03-21 16:51 ` Ramkumar Ramachandra
2013-03-27 17:13 ` Ramkumar Ramachandra
2013-03-27 17:38 ` Junio C Hamano
2013-03-28 12:47 ` [PATCH v2] " Ramkumar Ramachandra
2013-03-28 18:57 ` Jonathan Nieder
2013-03-28 20:26 ` Junio C Hamano
2013-03-31 20:59 ` Ramkumar Ramachandra
2013-04-01 1:39 ` Junio C Hamano
2013-04-01 1:40 ` [PATCH 1/3] send-email: use "return;" not "return undef;" on error codepaths Junio C Hamano
2013-04-01 1:40 ` [PATCH 2/3] send-email: drop misleading function prototype Junio C Hamano
2013-04-01 2:20 ` Jonathan Nieder
2013-04-01 4:09 ` Eric Sunshine
2013-04-01 1:40 ` [PATCH 3/3] send-email: use the three-arg form of open in recipients_cmd Junio C Hamano
2013-04-01 2:30 ` Jonathan Nieder [this message]
2013-04-02 7:46 ` Ramkumar Ramachandra
2013-04-01 4:08 ` [PATCH 1/3] send-email: use "return;" not "return undef;" on error codepaths Eric Sunshine
2013-04-02 7:59 ` Ramkumar Ramachandra
2013-04-02 14:49 ` Junio C Hamano
2013-04-02 7:41 ` [PATCH v2] git-send-email.perl: implement suggestions made by perlcritic Ramkumar Ramachandra
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=20130401023003.GD11704@elie.Belkin \
--to=jrnieder@gmail.com \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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;
as well as URLs for NNTP newsgroup(s).