We can't completely instantiate our cgit wrapper without knowing
knowing cgit locations for serving static content.
Fixes: a5968dc059f655a ("config: lazy-load coderepos, support extindex")
sub new {
my ($class, $pi_cfg) = @_;
my ($cgit_bin, $cgit_data) = locate_cgit($pi_cfg);
sub new {
my ($class, $pi_cfg) = @_;
my ($cgit_bin, $cgit_data) = locate_cgit($pi_cfg);
+ # TODO: support gitweb and other repository viewers?
+ if (defined(my $cgitrc = $pi_cfg->{-cgitrc_unparsed})) {
+ $pi_cfg->parse_cgitrc($cgitrc, 0);
+ }
my $self = bless {
cmd => [ $cgit_bin ],
cgit_data => $cgit_data,
pi_cfg => $pi_cfg,
}, $class;
my $self = bless {
cmd => [ $cgit_bin ],
cgit_data => $cgit_data,
pi_cfg => $pi_cfg,
}, $class;
- $pi_cfg->fill_all; # fill in -code_repos mapped to inboxes
+ # fill in -code_repos mapped to inboxes
+ $pi_cfg->each_inbox($pi_cfg->can('repo_objs'));
# some cgit repos may not be mapped to inboxes, so ensure those exist:
my $code_repos = $pi_cfg->{-code_repos};
# some cgit repos may not be mapped to inboxes, so ensure those exist:
my $code_repos = $pi_cfg->{-code_repos};
my ($self, $nick) = @_;
my $pfx = "coderepo.$nick";
my ($self, $nick) = @_;
my $pfx = "coderepo.$nick";
- # TODO: support gitweb and other repository viewers?
- if (defined(my $cgitrc = delete $self->{-cgitrc_unparsed})) {
- parse_cgitrc($self, $cgitrc, 0);
- }
my $dir = $self->{"$pfx.dir"}; # aka "GIT_DIR"
unless (defined $dir) {
warn "$pfx.dir unset\n";
my $dir = $self->{"$pfx.dir"}; # aka "GIT_DIR"
unless (defined $dir) {
warn "$pfx.dir unset\n";