]> Sergey Matveev's repositories - public-inbox.git/commitdiff
v2writable: index_sync adds new epochs to alternates
authorEric Wong <e@80x24.org>
Fri, 8 Mar 2019 22:52:17 +0000 (22:52 +0000)
committerEric Wong <e@80x24.org>
Fri, 8 Mar 2019 22:52:51 +0000 (22:52 +0000)
Newly-cloned epochs need to be in alternates file of
all.git for the web and NNTP interfaces to work.  So
allow invocations of "public-inbox-index" to idempotently
ensure the epoch is visible from the all.git repo.

lib/PublicInbox/V2Writable.pm

index bc31ffa5edc79a0425baea3244836b926bb401ca..6829a34376105fcd00c1402d0e2a3dbfad7e0b6b 100644 (file)
@@ -941,6 +941,7 @@ sub index_sync {
                my $git_dir = git_dir_n($self, $i);
                die "already reindexing!\n" if delete $self->{reindex_pipe};
                -d $git_dir or next; # missing parts are fine
+               fill_alternates($self, $i);
                my $git = PublicInbox::Git->new($git_dir);
                my $unindex = delete $self->{"unindex-range.$i"};
                $self->unindex($opts, $git, $unindex) if $unindex;