From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 21B661F4DA for ; Sat, 8 Oct 2022 08:24:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1665217489; bh=YI4lgv/Wh1d7tBrZtSOAV5SP5Ml55FdPzArtlVaDF9E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XyftbDHYsUkLmg1VI5IeZEY7+OC/PtWe5yKVNMWZHQcEPbFi4PArwgERl9kbOb8rl ymIDKlendikGIQxTUWyArB8QDV24R22vJB6E/fn6OLFJmcYItiFEZTA03DsUsZzYM1 d0ifPADhcwiEVdQUqSpmQ1MwVHaGukOP71rn8qug= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/5] config: remove {-cgitrc_unparsed} field Date: Sat, 8 Oct 2022 08:24:44 +0000 Message-Id: <20221008082448.9856-2-e@80x24.org> In-Reply-To: <20221008082448.9856-1-e@80x24.org> References: <20221008082448.9856-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This field has been unneeded since commit 6890430df808 (cgit: fix fallout from lazy coderepo loading, 2021-03-18) --- lib/PublicInbox/Config.pm | 2 +- lib/PublicInbox/WwwCoderepo.pm | 6 +++--- 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'));