about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/Git.pm9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm
index 3d97300c..c6c1c802 100644
--- a/lib/PublicInbox/Git.pm
+++ b/lib/PublicInbox/Git.pm
@@ -240,17 +240,16 @@ sub batch_prepare ($) {
 }
 
 sub _cat_file_cb {
-        my ($bref, undef, undef, $size, $result) = @_;
-        @$result = ($bref, $size);
+        my ($bref, $oid, $type, $size, $result) = @_;
+        @$result = ($bref, $oid, $type, $size);
 }
 
 sub cat_file {
-        my ($self, $oid, $sizeref) = @_;
+        my ($self, $oid) = @_;
         my $result = [];
         cat_async($self, $oid, \&_cat_file_cb, $result);
         cat_async_wait($self);
-        $$sizeref = $result->[1] if $sizeref;
-        $result->[0];
+        wantarray ? @$result : $result->[0];
 }
 
 sub check_async_step ($$) {