]> Sergey Matveev's repositories - public-inbox.git/commitdiff
config: remove {-cgitrc_unparsed} field
authorEric Wong <e@80x24.org>
Sat, 8 Oct 2022 08:24:44 +0000 (08:24 +0000)
committerEric Wong <e@80x24.org>
Sun, 9 Oct 2022 16:48:35 +0000 (16:48 +0000)
This field has been unneeded since commit 6890430df808
(cgit: fix fallout from lazy coderepo loading, 2021-03-18)

lib/PublicInbox/Config.pm
lib/PublicInbox/WwwCoderepo.pm

index 42bd9438fb82db44f6fff62cbbc5d5c0ea78f8fe..5cdf182ea3b61ef3a930c13eaeb94c08ab947d6a 100644 (file)
@@ -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
index 6c119b2829d569ac06dafb21c473c3cb592d8da4..d491bba222e9f7a969af3ab629271386936e6de2 100644 (file)
@@ -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'));