From 1d6ebab439828dce8b7e8cbb99dfbc237e9d5a74 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 23 Oct 2021 20:19:38 +0000 Subject: [PATCH] config: remove *_url_format support for cgit 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; -- 2.44.0