Git.pm: allow command_close_bidi_pipe to be called as method
The documentation of command_close_bidi_pipe() claims that it can be called as a method, but it does not check whether the first argument is $self or not assuming the latter. Using _maybe_self() fixes this. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
2f19ada7f8
commit
1bc760aeb7
@ -430,7 +430,7 @@ have more complicated structure.
|
||||
|
||||
sub command_close_bidi_pipe {
|
||||
local $?;
|
||||
my ($pid, $in, $out, $ctx) = @_;
|
||||
my ($self, $pid, $in, $out, $ctx) = _maybe_self(@_);
|
||||
foreach my $fh ($in, $out) {
|
||||
unless (close $fh) {
|
||||
if ($!) {
|
||||
|
Reference in New Issue
Block a user