]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
cgit: fix smart HTTP clone interception
authorEric Wong <e@80x24.org>
Tue, 7 Mar 2023 09:32:37 +0000 (09:32 +0000)
committerEric Wong <e@80x24.org>
Tue, 7 Mar 2023 19:12:35 +0000 (19:12 +0000)
We need to use the proper hash and key to do coderepo lookups
since we culled a redundant data structure a few months back.

Fixes: 1802dc29bda25a54 ("www_coderepo: do not copy {-code_repos} from config")
lib/PublicInbox/Cgit.pm

index 336098caac063a30f97e711ede41fc9e918540f7..a1a2e8284aec674ab22f8ba58800be0b676537a0 100644 (file)
@@ -91,7 +91,7 @@ sub call {
        # handle requests without spawning cgit iff possible:
        if ($path_info =~ m!\A/(.+?)/($PublicInbox::GitHTTPBackend::ANY)\z!ox) {
                my ($nick, $path) = ($1, $2);
-               if (my PublicInbox::Git $git = $self->{"\0$nick"}) {
+               if (my $git = $self->{pi_cfg}->{-code_repos}->{$nick}) {
                        return serve($env, $git, $path);
                }
        } elsif ($path_info =~ m!$self->{static}! &&