From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id E56DB1F47E for ; Wed, 4 Jan 2023 10:34:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1672828451; bh=91yp+65D/PWBWibXY6nd1h21jp0E9t4wzzcf6rMJsOs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vSdpD+4kChNv8/PUDRAFr3ZTuvD2lelHYQz+7AuEToQ5gut/lrNqXTz31/ATvovtL 9gG0th8aFtS28ccvlbd2ftCvYdxsADNegB5U8H4JSxGPDPVvWaErvLzFL9thoDAFta up5AgqqBTmWNi97k3/23IRsNh3O4VFP7EkzZ+wOU= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/3] git: pub_urls shows base_url default Date: Wed, 4 Jan 2023 10:34:04 +0000 Message-Id: <20230104103405.2432349-3-e@80x24.org> In-Reply-To: <20230104103405.2432349-1-e@80x24.org> References: <20230104103405.2432349-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Since we have native coderepo viewing support without cgit, configuring coderepo.$FOO.cgitUrl shouldn't be necessary anymore and we can infer the public name based on the project nickname (or whatever's in the generated project.list) --- lib/PublicInbox/Git.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index 68f72052..f6abe185 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -480,9 +480,10 @@ sub isrch {} # TODO sub pub_urls { my ($self, $env) = @_; if (my $urls = $self->{cgit_url}) { - return map { host_prefix_url($env, $_) } @$urls; + map { host_prefix_url($env, $_) } @$urls; + } else { + (base_url($self, $env)); } - (local_nick($self) // '???'); } sub cat_async_begin {