From: Eric Wong Date: Fri, 8 Mar 2019 22:52:17 +0000 (+0000) Subject: v2writable: index_sync adds new epochs to alternates X-Git-Tag: v1.2.0~353 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=48e20d29289ed60f5e4c14b5425bd63d1f824c5b;hp=534c55e5a8dc63942bfcd8401b08915c6ce118bc;p=public-inbox.git v2writable: index_sync adds new epochs to alternates 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. --- diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index bc31ffa5..6829a343 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -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;