public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Michal Nazarewicz <mina86@mina86•com>
To: Jeff King <peff@peff•net>
Cc: gitster@pobox•com, git@vger•kernel.org
Subject: Re: [PATCHv4 4/6] Git.pm: allow pipes to be closed prior to calling command_close_bidi_pipe
Date: Tue, 12 Feb 2013 22:13:10 +0100	[thread overview]
Message-ID: <xa1thalh9qxl.fsf@mina86.com> (raw)
In-Reply-To: <20130212205141.GC25330@sigill.intra.peff.net>

[-- Attachment #1: Type: text/plain, Size: 960 bytes --]

On Tue, Feb 12 2013, Jeff King wrote:
> On Tue, Feb 12, 2013 at 03:02:31PM +0100, Michal Nazarewicz wrote:
>
>>  sub command_close_bidi_pipe {
>>  	local $?;
>>  	my ($self, $pid, $in, $out, $ctx) = _maybe_self(@_);
>> -	_cmd_close($ctx, $in, $out);
>> +	_cmd_close($ctx, grep defined, $in, $out);
>
> Maybe it is just me, but I find the "grep EXPR" form a little subtle
> inside an argument list. Either:
>
>   _cmd_close($ctx, grep { defined } $in, $out);
>
> or
>
>   _cmd_close($ctx, grep(defined, $in, $out));
>
> is a little more obvious to me.

I personally avoid parens whenever possible in Perl, but Git.pm seem to
favour them so I went with the second option.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@google•com>--------------ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2013-02-12 21:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12 14:02 [PATCHv4 0/6] git-credential support in git-send-email Michal Nazarewicz
2013-02-12 14:02 ` [PATCHv4 1/6] Git.pm: allow command_close_bidi_pipe to be called as method Michal Nazarewicz
2013-02-12 14:02 ` [PATCHv4 2/6] Git.pm: fix example in command_close_bidi_pipe documentation Michal Nazarewicz
2013-02-12 14:02 ` [PATCHv4 3/6] Git.pm: refactor command_close_bidi_pipe to use _cmd_close Michal Nazarewicz
2013-02-12 18:55   ` Junio C Hamano
2013-02-12 20:48     ` Jeff King
2013-02-12 21:12       ` Michal Nazarewicz
2013-02-12 21:17         ` Junio C Hamano
2013-02-12 14:02 ` [PATCHv4 4/6] Git.pm: allow pipes to be closed prior to calling command_close_bidi_pipe Michal Nazarewicz
2013-02-12 20:51   ` Jeff King
2013-02-12 21:13     ` Michal Nazarewicz [this message]
2013-02-12 21:14     ` Junio C Hamano
2013-02-12 21:17       ` Jeff King
2013-02-12 22:50       ` Michal Nazarewicz
2013-02-12 14:02 ` [PATCHv4 5/6] Git.pm: add interface for git credential command Michal Nazarewicz
2013-02-27 14:18   ` Matthieu Moy
2013-02-12 14:02 ` [PATCHv4 6/6] git-send-email: use git credential to obtain password Michal Nazarewicz
2013-02-27 14:20   ` Matthieu Moy
2013-02-27 15:54     ` Junio C Hamano
2013-02-27 16:09       ` Michal Nazarewicz
2013-02-27 16:13       ` Matthieu Moy
2013-02-27 16:29         ` Junio C Hamano

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=xa1thalh9qxl.fsf@mina86.com \
    --to=mina86@mina86$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=peff@peff$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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