]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiStore.pm
lei_store: populate ALL.git/alternates with new epochs
[public-inbox.git] / lib / PublicInbox / LeiStore.pm
index 546d500be071c8a77b8df24efe611f526bc5a1a1..776018284b5562b8fb5af5ad0c1404e7186b8c73 100644 (file)
@@ -192,10 +192,10 @@ sub maildir_keywords {
 
 sub add_eml {
        my ($self, $eml, @kw) = @_;
-       my $eidx = eidx_init($self);
+       my $im = $self->importer; # may create new epoch
+       my $eidx = eidx_init($self); # writes ALL.git/objects/info/alternates
        my $oidx = $eidx->{oidx};
        my $smsg = bless { -oidx => $oidx }, 'PublicInbox::Smsg';
-       my $im = $self->importer;
        $im->add($eml, undef, $smsg) or return; # duplicate returns undef
 
        local $self->{current_info} = $smsg->{blob};