about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-10-08 08:24:44 +0000
committerEric Wong <e@80x24.org>2022-10-09 16:48:35 +0000
commit8bd0fadfe7fcc7c44a3478ffefede71f24319441 (patch)
tree8fd0d0c1b5d65fd102eaa3e7aabc57fd71fafe1f /lib
parent5b39ed2b6b3d5d8c24240f1b1df8bfd751b0e6bc (diff)
downloadpublic-inbox-8bd0fadfe7fcc7c44a3478ffefede71f24319441.tar.gz
This field has been unneeded since commit 6890430df808
(cgit: fix fallout from lazy coderepo loading, 2021-03-18)
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/Config.pm2
-rw-r--r--lib/PublicInbox/WwwCoderepo.pm6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm
index 42bd9438..5cdf182e 100644
--- a/lib/PublicInbox/Config.pm
+++ b/lib/PublicInbox/Config.pm
@@ -46,7 +46,6 @@ sub new {
         $self->{-no_obfuscate} = {};
         $self->{-limiters} = {};
         $self->{-code_repos} = {}; # nick => PublicInbox::Git object
-        $self->{-cgitrc_unparsed} = $self->{'publicinbox.cgitrc'};
 
         if (my $no = delete $self->{'publicinbox.noobfuscate'}) {
                 $no = _array($no);
@@ -277,6 +276,7 @@ sub scan_projects_coderepo ($$$) {
 
 sub parse_cgitrc {
         my ($self, $cgitrc, $nesting) = @_;
+        $cgitrc //= $self->{'publicinbox.cgitrc'};
         if ($nesting == 0) {
                 # defaults:
                 my %s = map { $_ => 1 } qw(/cgit.css /cgit.png
diff --git a/lib/PublicInbox/WwwCoderepo.pm b/lib/PublicInbox/WwwCoderepo.pm
index 6c119b28..d491bba2 100644
--- a/lib/PublicInbox/WwwCoderepo.pm
+++ b/lib/PublicInbox/WwwCoderepo.pm
@@ -23,9 +23,9 @@ sub prepare_coderepos {
         my $pi_cfg = $self->{pi_cfg};
 
         # TODO: support gitweb and other repository viewers?
-        if (defined(my $cgitrc = $pi_cfg->{-cgitrc_unparsed})) {
-                $pi_cfg->parse_cgitrc($cgitrc, 0);
-        }
+        defined($pi_cfg->{'publicinbox.cgitrc'}) and
+                $pi_cfg->parse_cgitrc(undef, 0);
+
         my $code_repos = $pi_cfg->{-code_repos};
         for my $k (grep(/\Acoderepo\.(?:.+)\.dir\z/, keys %$pi_cfg)) {
                 $k = substr($k, length('coderepo.'), -length('.dir'));