use PublicInbox::ProcessPipe;
use PublicInbox::Spawn qw(which spawn popen_rd);
use PublicInbox::LeiDedupe;
-use PublicInbox::Git;
use PublicInbox::GitAsyncCat;
use PublicInbox::PktOp qw(pkt_do);
use Symbol qw(gensym);
sub _mbox_augment_kw_maybe {
my ($eml, $lei, $lse, $augment) = @_;
- my @kw = PublicInbox::LeiStore::mbox_keywords($eml);
- update_kw_maybe($lei, $lse, $eml, \@kw);
+ my $kw = PublicInbox::MboxReader::mbox_keywords($eml);
+ update_kw_maybe($lei, $lse, $eml, $kw);
_augment($eml, $lei) if $augment;
}
return unless $lse;
my $x = $lse->kw_changed($eml, $kw);
if ($x) {
- $lei->{sto}->ipc_do('set_eml', $eml, @$kw);
+ $lei->{sto}->ipc_do('set_eml', $eml, { kw => $kw });
} elsif (!defined($x)) {
$lei->{sto}->ipc_do('set_xkw', $eml, $kw);
}
my ($self) = @_;
if ($self->{base_type} eq 'maildir') {
my $t = time + 1;
- utime($t, $t, "$self->{dst}/cur");
+ utime($t, $t, $self->{dst} . 'cur');
}
}
sub write_mail { # via ->wq_io_do
- my ($self, $git_dir, $smsg) = @_;
- my $git = $self->{"$$\0$git_dir"} //= PublicInbox::Git->new($git_dir);
- git_async_cat($git, $smsg->{blob}, \&git_to_mail,
+ my ($self, $smsg) = @_;
+ git_async_cat($self->{lei}->{ale}->git, $smsg->{blob}, \&git_to_mail,
[$self->{wcb}, $smsg]);
}
sub wq_atexit_child {
my ($self) = @_;
delete $self->{wcb};
- for my $git (delete @$self{grep(/\A$$\0/, keys %$self)}) {
- $git->async_wait_all;
- }
+ $self->{lei}->{ale}->git->async_wait_all;
$SIG{__WARN__} = 'DEFAULT';
}