]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Config.pm
www_coderepo: wire up snapshots from summary
[public-inbox.git] / lib / PublicInbox / Config.pm
index 42bd9438fb82db44f6fff62cbbc5d5c0ea78f8fe..a430cd5ccd2106d886bd7d8feda0b72acb8e7904 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
@@ -325,6 +325,8 @@ sub parse_cgitrc {
                } elsif (m!\A(?:css|favicon|logo|repo\.logo)=(/.+)\z!) {
                        # absolute paths for static files via PublicInbox::Cgit
                        $self->{-cgit_static}->{$1} = 1;
+               } elsif (s!\Asnapshots=\s*!!) {
+                       $self->{'coderepo.snapshots'} = $_;
                }
        }
        cgit_repo_merge($self, $repo->{dir}, $repo) if $repo;