From 847389d8d4012177616e51f0af3151ed8ab58ff3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 28 Apr 2023 21:07:30 +0000 Subject: git: make check_async callbacks identical to cat_async This simplifies Git->cat_async_step and fixes Git->async_abort, the latter of which was passing arguments improperly for the --batch-check (or `info') case at the cost of making the few check_async callers handle an extra argument. The extra (PublicInbox::Git) $self argument for check_async callbacks is now gone, as avoiding the temporary cyclic reference doesn't seem worthwhile since the temporary cyclic reference appears in the ->cat_async code paths, too. --- lib/PublicInbox/V2Writable.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/PublicInbox/V2Writable.pm') diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index ae8d778f..191c5588 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -1160,6 +1160,7 @@ sub index_todo ($$$) { }; if ($f eq 'm') { if ($sync->{max_size}) { + $req->{git} = $all; $all->check_async($oid, \&check_size, $req); } else { $all->cat_async($oid, $index_oid, $req); -- cgit v1.2.3-24-ge0c7