diff options
author | Eric Wong <e@80x24.org> | 2023-10-01 09:54:17 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-10-01 22:41:40 +0000 |
commit | 7f05ec260f2a8e81c884a1461f1573c1b7edef12 (patch) | |
tree | df336a57c79368beb9881294cdee167402b3cbe3 /lib/PublicInbox/GitAsyncCat.pm | |
parent | 3f5ac9b00bc95de4a5f4f06266d3a2eb5424e24a (diff) | |
download | public-inbox-7f05ec260f2a8e81c884a1461f1573c1b7edef12.tar.gz |
Asking callers to pass a scalar reference is awkward and doesn't benefit modern Perl with CoW support. Unlike some constant error messages, it can't save any allocations at all since there's no constant strings being passed to libgit2.
Diffstat (limited to 'lib/PublicInbox/GitAsyncCat.pm')
-rw-r--r-- | lib/PublicInbox/GitAsyncCat.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/GitAsyncCat.pm b/lib/PublicInbox/GitAsyncCat.pm index 71ee1147..f8b2a9fc 100644 --- a/lib/PublicInbox/GitAsyncCat.pm +++ b/lib/PublicInbox/GitAsyncCat.pm @@ -18,7 +18,7 @@ sub ibx_async_cat ($$$$) { require PublicInbox::Gcf2Client; PublicInbox::Gcf2Client::new(); } // 0)) { # 0: do not retry if libgit2 or Inline::C are missing - $GCF2C->gcf2_async(\"$oid $git->{git_dir}\n", $cb, $arg); + $GCF2C->gcf2_async("$oid $git->{git_dir}\n", $cb, $arg); \undef; } else { # read-only end of git-cat-file pipe $git->cat_async($oid, $cb, $arg); @@ -42,7 +42,7 @@ sub ibx_async_prefetch { if (!defined($ibx->{topdir}) && $GCF2C) { if (!@{$GCF2C->{inflight} // []}) { $oid .= " $git->{git_dir}\n"; - return $GCF2C->gcf2_async(\$oid, $cb, $arg); # true + return $GCF2C->gcf2_async($oid, $cb, $arg); # true } } elsif ($git->{epwatch}) { return $git->async_prefetch($oid, $cb, $arg); |