summaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorMichal Nazarewicz <mina86@mina86.com>2013-02-07 14:01:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-02-07 18:37:13 (GMT)
commit1bc760aeb784701a702c0a306d464834e96b1f3d (patch)
treed10f9dc288b4b162c2e8710ca4ec1335261d8db0 /perl
parent2f19ada7f8a5bb768816cf7334f65ae0ab03c8a7 (diff)
downloadgit-1bc760aeb784701a702c0a306d464834e96b1f3d.zip
git-1bc760aeb784701a702c0a306d464834e96b1f3d.tar.gz
git-1bc760aeb784701a702c0a306d464834e96b1f3d.tar.bz2
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>
Diffstat (limited to 'perl')
-rw-r--r--perl/Git.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl/Git.pm b/perl/Git.pm
index 931047c..bbb753a 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -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 ($!) {