From: Eric Wong Date: Sat, 23 Oct 2021 20:19:38 +0000 (+0000) Subject: config: remove *_url_format support for cgit X-Git-Tag: v1.7.0~73 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=1d6ebab439828dce8b7e8cbb99dfbc237e9d5a74 config: remove *_url_format support for cgit We're not using them, anywhere. --- 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;