* [PATCH 2/3] config: remove *_url_format support for cgit
2021-10-23 20:19 6% [PATCH 0/3] www: coderepo-related cleanups + fixes Eric Wong
@ 2021-10-23 20:19 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-10-23 20:19 UTC (permalink / raw)
To: meta
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;
^ permalink raw reply related [relevance 7%]
* [PATCH 0/3] www: coderepo-related cleanups + fixes
@ 2021-10-23 20:19 6% Eric Wong
2021-10-23 20:19 7% ` [PATCH 2/3] config: remove *_url_format support for cgit Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-10-23 20:19 UTC (permalink / raw)
To: meta
Eric Wong (3):
git: simplify local_nick, avoid "foo.git.git"
config: remove *_url_format support for cgit
www: respect coderepo.*.url during cgit init
lib/PublicInbox/Cgit.pm | 5 +----
lib/PublicInbox/Config.pm | 27 +++++----------------------
lib/PublicInbox/Git.pm | 9 ++-------
t/git.t | 8 +++++++-
4 files changed, 15 insertions(+), 34 deletions(-)
^ permalink raw reply [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-10-23 20:19 6% [PATCH 0/3] www: coderepo-related cleanups + fixes Eric Wong
2021-10-23 20:19 7% ` [PATCH 2/3] config: remove *_url_format support for cgit Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).