History

Reset ctx.repo to NULL when the config parser is finished

This global variable is used by the config parsing callback to keep track of the currently configured repository. If it is not reset to NULL when the config parser is finished, and neither `url` or `r` is specified on the querystring, cgit will wrongly consider the last configured repo as selected.

Lars Hjemli committed 18 years ago

Commit c6f74761 parent e87e8961 file · +1 −0Browse files

Unified · Split

cgit.c+1−0
@@ -440,6 +440,7 @@ int main(int argc, const char **argv) · 439 unmodified lines
440440
441441 parse_configfile(cgit_config_env ? cgit_config_env : CGIT_CONFIG,
442442 config_cb);
443+ ctx.repo = NULL;
443444 if (getenv("SCRIPT_NAME"))
444445 ctx.cfg.script_name = xstrdup(getenv("SCRIPT_NAME"));
445446 if (getenv("QUERY_STRING"))