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.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 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 CB36C1F9FC for ; Sat, 23 Oct 2021 20:19:39 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/3] config: remove *_url_format support for cgit Date: Sat, 23 Oct 2021 20:19:38 +0000 Message-Id: <20211023201939.27183-3-e@80x24.org> In-Reply-To: <20211023201939.27183-1-e@80x24.org> References: <20211023201939.27183-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We're not using them, anywhere. --- lib/PublicInbox/Config.pm | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index d38f6586..f2e5d5f0 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -328,30 +328,14 @@ sub parse_cgitrc { sub _fill_code_repo { my ($self, $nick) = @_; my $pfx = "coderepo.$nick"; - - my $dir = $self->{"$pfx.dir"}; # aka "GIT_DIR" - unless (defined $dir) { + my $dir = $self->{"$pfx.dir"} // do { # aka "GIT_DIR" warn "$pfx.dir unset\n"; return; - } - + }; my $git = PublicInbox::Git->new($dir); - foreach my $t (qw(blob commit tree tag)) { - $git->{$t.'_url_format'} = - _array($self->{lc("$pfx.${t}UrlFormat")}); - } - if (defined(my $cgits = $self->{"$pfx.cgiturl"})) { $git->{cgit_url} = $cgits = _array($cgits); $self->{"$pfx.cgiturl"} = $cgits; - - # cgit supports "/blob/?id=%s", but it's only a plain-text - # display and requires an unabbreviated id= - foreach my $t (qw(blob commit tag)) { - $git->{$t.'_url_format'} //= map { - "$_/$t/?id=%s" - } @$cgits; - } } $git;