]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
config: describe order dependency in cgitrc parsing
authorEric Wong <e@80x24.org>
Thu, 6 Apr 2023 21:02:03 +0000 (21:02 +0000)
committerEric Wong <e@80x24.org>
Fri, 7 Apr 2023 22:17:32 +0000 (22:17 +0000)
I just had to do a double-take here and look back at cgit.c
to see the ordering dependency wasn't a bug I introduced,
but mimicking what cgit does.

lib/PublicInbox/Config.pm

index e095ecd1070dd756dd699ce49b0e3c68f321d79c..df488f2390283a68da70b43579b4fa74eb9fe29a 100644 (file)
@@ -318,6 +318,8 @@ sub parse_cgitrc {
                        $k =~ tr/-/_/;
                        $self->{"-cgit_$k"} = $v;
                } elsif (m!\Ascan-path=(.+)\z!) {
+                       # this depends on being after project-list in the
+                       # config file, just like cgit.c
                        if (defined(my $list = $self->{-cgit_project_list})) {
                                scan_projects_coderepo($self, $list, $1);
                        } else {