Re: [PATCHv4 4/6] Git.pm: allow pipes to be closed prior to calling command_close_bidi_pipe
- From
Jeff King <peff@peff.net>
- Date
- Feb 12, 2013, 20:51 UTC
- Message-ID
- <20130212205141.GC25330@sigill.intra.peff.net>
- In-Reply-To
- <3bb6b7736eb4b0a958469be13d8c646faec1208a.1360677646.git.mina86@mina86.com>
On Tue, Feb 12, 2013 at 03:02:31PM +0100, Michal Nazarewicz wrote:
Show 5 quoted lines
> 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.
-Peff