From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id C4B9F1F9F3 for ; Sun, 24 Oct 2021 00:20:45 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/7] lei: always pass $lei to LeiAuth->op_merge Date: Sat, 23 Oct 2021 18:20:39 -0600 Message-Id: <20211024002045.17755-2-e@80x24.org> In-Reply-To: <20211024002045.17755-1-e@80x24.org> References: <20211024002045.17755-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This will make future developments easier. --- lib/PublicInbox/LeiExportKw.pm | 2 +- lib/PublicInbox/LeiForgetSearch.pm | 2 +- lib/PublicInbox/LeiImport.pm | 2 +- lib/PublicInbox/LeiLsMailSource.pm | 2 +- lib/PublicInbox/LeiMailDiff.pm | 2 +- lib/PublicInbox/LeiRefreshMailSync.pm | 2 +- lib/PublicInbox/LeiTag.pm | 2 +- lib/PublicInbox/LeiXSearch.pm | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/PublicInbox/LeiExportKw.pm b/lib/PublicInbox/LeiExportKw.pm index 5be9e51f..756d0e9c 100644 --- a/lib/PublicInbox/LeiExportKw.pm +++ b/lib/PublicInbox/LeiExportKw.pm @@ -115,7 +115,7 @@ EOM $self->{nwr}->{-skip_creat} = 1; } my $ops = {}; - $lei->{auth}->op_merge($ops, $self) if $lei->{auth}; + $lei->{auth}->op_merge($ops, $self, $lei) if $lei->{auth}; (my $op_c, $ops) = $lei->workers_start($self, 1, $ops); $lei->{wq1} = $self; $lei->{-err_type} = 'non-fatal'; diff --git a/lib/PublicInbox/LeiForgetSearch.pm b/lib/PublicInbox/LeiForgetSearch.pm index f353fe52..dfeb0293 100644 --- a/lib/PublicInbox/LeiForgetSearch.pm +++ b/lib/PublicInbox/LeiForgetSearch.pm @@ -46,7 +46,7 @@ sub lei_forget_search { $self->prepare_inputs($lei, $self->{o_remote}) or return; } my $ops = {}; - $lei->{auth}->op_merge($ops, $self) if $lei->{auth}; + $lei->{auth}->op_merge($ops, $self, $lei) if $lei->{auth}; (my $op_c, $ops) = $lei->workers_start($self, 1, $ops); $lei->{wq1} = $self; net_merge_all_done($self) unless $lei->{auth}; diff --git a/lib/PublicInbox/LeiImport.pm b/lib/PublicInbox/LeiImport.pm index 2f8fd6c6..d8f39fdf 100644 --- a/lib/PublicInbox/LeiImport.pm +++ b/lib/PublicInbox/LeiImport.pm @@ -103,7 +103,7 @@ sub do_import_index ($$@) { ($lei->{opt}->{'new-only'} && (!$net || !$net->{imap_order})) and warn "# --new-only is only for IMAP\n"; my $ops = {}; - $lei->{auth}->op_merge($ops, $self) if $lei->{auth}; + $lei->{auth}->op_merge($ops, $self, $lei) if $lei->{auth}; $lei->{-eml_noisy} = 1; (my $op_c, $ops) = $lei->workers_start($self, $j, $ops); $lei->{wq1} = $self; diff --git a/lib/PublicInbox/LeiLsMailSource.pm b/lib/PublicInbox/LeiLsMailSource.pm index 7c3c0cda..5eb7032d 100644 --- a/lib/PublicInbox/LeiLsMailSource.pm +++ b/lib/PublicInbox/LeiLsMailSource.pm @@ -96,7 +96,7 @@ sub lei_ls_mail_source { } $lei->start_pager if $isatty; my $ops = {}; - $lei->{auth}->op_merge($ops, $self); + $lei->{auth}->op_merge($ops, $self, $lei); (my $op_c, $ops) = $lei->workers_start($self, 1, $ops); $lei->{wq1} = $self; $lei->{-err_type} = 'non-fatal'; diff --git a/lib/PublicInbox/LeiMailDiff.pm b/lib/PublicInbox/LeiMailDiff.pm index a29ae225..4f3a4608 100644 --- a/lib/PublicInbox/LeiMailDiff.pm +++ b/lib/PublicInbox/LeiMailDiff.pm @@ -83,7 +83,7 @@ sub lei_mail_diff { $lei->{opt}->{color} //= $isatty; $lei->start_pager if $isatty; my $ops = {}; - $lei->{auth}->op_merge($ops, $self) if $lei->{auth}; + $lei->{auth}->op_merge($ops, $self, $lei) if $lei->{auth}; (my $op_c, $ops) = $lei->workers_start($self, 1, $ops); $lei->{wq1} = $self; $lei->{-err_type} = 'non-fatal'; diff --git a/lib/PublicInbox/LeiRefreshMailSync.pm b/lib/PublicInbox/LeiRefreshMailSync.pm index 0cb9f3dc..f516f572 100644 --- a/lib/PublicInbox/LeiRefreshMailSync.pm +++ b/lib/PublicInbox/LeiRefreshMailSync.pm @@ -82,7 +82,7 @@ EOM $lei->{opt}->{'mail-sync'} = 1; # for prepare_inputs $self->prepare_inputs($lei, \@folders) or return; my $ops = {}; - $lei->{auth}->op_merge($ops, $self) if $lei->{auth}; + $lei->{auth}->op_merge($ops, $self, $lei) if $lei->{auth}; (my $op_c, $ops) = $lei->workers_start($self, 1, $ops); $lei->{wq1} = $self; $lei->{-err_type} = 'non-fatal'; diff --git a/lib/PublicInbox/LeiTag.pm b/lib/PublicInbox/LeiTag.pm index 817b87f8..77654d1a 100644 --- a/lib/PublicInbox/LeiTag.pm +++ b/lib/PublicInbox/LeiTag.pm @@ -49,7 +49,7 @@ sub lei_tag { # the "lei tag" method grep(defined, @$vmd_mod{qw(+kw +L -L -kw)}) or return $lei->fail('no keywords or labels specified'); my $ops = {}; - $lei->{auth}->op_merge($ops, $self) if $lei->{auth}; + $lei->{auth}->op_merge($ops, $self, $lei) if $lei->{auth}; (my $op_c, $ops) = $lei->workers_start($self, 1, $ops); $lei->{wq1} = $self; $lei->{-err_type} = 'non-fatal'; diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm index 119070a2..acc36897 100644 --- a/lib/PublicInbox/LeiXSearch.pm +++ b/lib/PublicInbox/LeiXSearch.pm @@ -548,7 +548,7 @@ sub do_query { 'child_error' => [ $lei ], 'incr_start_query' => [ $self, $lei ], }; - $lei->{auth}->op_merge($ops, $l2m) if $l2m && $lei->{auth}; + $lei->{auth}->op_merge($ops, $l2m, $lei) if $l2m && $lei->{auth}; my $end = $lei->pkt_op_pair; $lei->{1}->autoflush(1); $lei->start_pager if delete $lei->{need_pager};