]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei_mirror: set description for non-inboxes, too
authorEric Wong <e@80x24.org>
Mon, 28 Nov 2022 05:31:47 +0000 (05:31 +0000)
committerEric Wong <e@80x24.org>
Mon, 28 Nov 2022 23:38:56 +0000 (23:38 +0000)
We can still set $GIT_DIR/description when cloning coderepos with
--inbox-config=never

lib/PublicInbox/LeiMirror.pm

index 3fea4c290acf94c435041ade744495fdca71c6c1..21341efb99ab32d85f2a008767c974de4d3356b3 100644 (file)
@@ -218,8 +218,6 @@ sub set_description ($) {
 sub index_cloned_inbox {
        my ($self, $iv) = @_;
        my $lei = $self->{lei};
-       eval { set_description($self) };
-       warn $@ if $@;
 
        # n.b. public-inbox-clone works w/o (SQLite || Xapian)
        # lei is useless without Xapian + SQLite
@@ -580,6 +578,8 @@ sub v1_done { # called via OnDestroy
                $f->unlink_on_destroy(0);
        }
        pack_refs($self, $dst) if delete $self->{-do_pack_refs};
+       eval { set_description($self) };
+       warn $@ if $@;
        return if ($self->{-is_epoch} ||
                $self->{lei}->{opt}->{'inbox-config'} ne 'always');
        write_makefile($dst, 1);
@@ -604,6 +604,8 @@ sub v2_done { # called via OnDestroy
        }
        write_makefile($dst, 2);
        undef $lck; # unlock
+       eval { set_description($self) };
+       warn $@ if $@;
        index_cloned_inbox($self, 2);
 }