+sub async_check ($$$$) {
+ my ($ibx, $oidish, $cb, $arg) = @_; # $ibx may be $ctx
+ my $git = $ibx->{git} // $ibx->git;
+ $git->check_async($oidish, $cb, $arg);
+ return watch_cat($git) if $git->{-bc}; # --batch-command
+ $git->{async_chk} //= do {
+ my $self = bless { git => $git }, 'PublicInbox::GitAsyncCheck';
+ $git->{in_c}->blocking(0);
+ $self->SUPER::new($git->{in_c}, EPOLLIN|EPOLLET);
+ awaitpid($git->{pid_c}, \&aclose, $self);
+ \undef; # this is a true ref()
+ };
+}
+