From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.1 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 3143320199 for ; Mon, 28 Nov 2022 05:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1669613563; bh=6U3hvzwtSxdF/dz/aG6zFfPVk1gnOMDCwXyZvjLz4FE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=4dkX2watMGlza1sPBa9vg4ZUFHBRGuJMQ/SQ5uVMniUTxKAgr6lHEqP7GY3pu3jTB oqpphkaY2yKW7fAdys4a5FYokSYslLVwwRZbhB55AQWIu1/TJl4D02FFboW36UIsf4 78+TcG065Uq/Hevv3N8f7J+XB0BmhluR2H9XrpJo= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 50/95] lei_mirror: set description for non-inboxes, too Date: Mon, 28 Nov 2022 05:31:47 +0000 Message-Id: <20221128053232.291618-51-e@80x24.org> In-Reply-To: <20221128053232.291618-1-e@80x24.org> References: <20221128053232.291618-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We can still set $GIT_DIR/description when cloning coderepos with --inbox-config=never --- lib/PublicInbox/LeiMirror.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/LeiMirror.pm b/lib/PublicInbox/LeiMirror.pm index 3fea4c29..21341efb 100644 --- a/lib/PublicInbox/LeiMirror.pm +++ b/lib/PublicInbox/LeiMirror.pm @@ -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); }