- kill('TERM', keys %$live);
- $lei->child_error($cerr, "@$cmd failed");
+ kill('TERM', keys %$LIVE);
+ $self->{lei}->child_error($cerr, "@$cmd failed");
+ }
+}
+
+sub v1_done { # called via OnDestroy
+ my ($self) = @_;
+ return if $self->{dry_run} || !$LIVE;
+ _write_inbox_config($self);
+ my $dst = $self->{cur_dst} // $self->{dst};
+ if (defined(my $o = $self->{-ent} ? $self->{-ent}->{owner} : undef)) {
+ run_die([qw(git config -f), "$dst/config", 'gitweb.owner', $o]);
+ }
+ my $o = "$dst/objects";
+ if (open(my $fh, '<', "$o/info/alternates")) {
+ chomp(my @l = <$fh>);
+ for (@l) { $_ = File::Spec->abs2rel($_, $o)."\n" }
+ my $f = File::Temp->new(TEMPLATE => '.XXXX', DIR => "$o/info");
+ print $f @l;
+ $f->flush or die "flush($f): $!";
+ rename($f->filename, "$o/info/alternates") or
+ die "rename($f, $o/info/alternates): $!";
+ $f->unlink_on_destroy(0);