+sub v2_done {
+ my ($self) = @_;
+ require PublicInbox::MultiGit;
+ my $dst = $self->{cur_dst} // $self->{dst};
+ my $mg = PublicInbox::MultiGit->new($dst, 'all.git', 'git');
+ $mg->fill_alternates;
+ for my $i ($mg->git_epochs) { $mg->epoch_cfg_set($i) }
+ for my $edst (@{delete($self->{-read_only}) // []}) {
+ my @st = stat($edst) or die "stat($edst): $!";
+ chmod($st[2] & 0555, $edst) or die "chmod(a-w, $edst): $!";
+ }
+ write_makefile($dst, 2);
+ delete $self->{-locked} // die "BUG: $dst not locked"; # unlock
+ index_cloned_inbox($self, 2);
+}
+