From 0054246c2d03fcc91bc899da5ef41a68f505e542 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 2 Nov 2021 18:14:44 +0000 Subject: lei: simplify common LeiInput users with ->wq1_start This method replaces a common pattern of starting workers, preparing internal auth ops, and asynchronous waiting of command completion. It also adds missing LeiAuth support to rediff and rm which rarely need auth. --- lib/PublicInbox/LeiRediff.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/PublicInbox/LeiRediff.pm') diff --git a/lib/PublicInbox/LeiRediff.pm b/lib/PublicInbox/LeiRediff.pm index 56c457fc..f0521bcc 100644 --- a/lib/PublicInbox/LeiRediff.pm +++ b/lib/PublicInbox/LeiRediff.pm @@ -279,10 +279,7 @@ sub lei_rediff { my $isatty = -t $lei->{1}; $lei->{opt}->{color} //= $isatty; $lei->start_pager if $isatty; - my ($op_c, $ops) = $lei->workers_start($self, 1); - $lei->{wq1} = $self; - net_merge_all_done($self) unless $lei->{auth}; - $lei->wait_wq_events($op_c, $ops); + $lei->wq1_start($self); } sub ipc_atfork_child { -- cgit v1.2.3-24-ge0c7