Unidiff1 files changed, 1 insertions, 0 deletions
|
diff --git a/cgit.c b/cgit.c index 763242a..6ec763f 100644 --- a/ cgit.c+++ b/ cgit.c |
|
@@ -435,16 +435,17 @@ int main(int argc, const char **argv) |
435 | prepare_context(&ctx); |
435 | prepare_context(&ctx); |
436 | item.st.st_mtime = time(NULL); |
436 | item.st.st_mtime = time(NULL); |
437 | cgit_repolist.length = 0; |
437 | cgit_repolist.length = 0; |
438 | cgit_repolist.count = 0; |
438 | cgit_repolist.count = 0; |
439 | cgit_repolist.repos = NULL; |
439 | cgit_repolist.repos = NULL; |
440 | |
440 | |
441 | parse_configfile(cgit_config_env ? cgit_config_env : CGIT_CONFIG, |
441 | parse_configfile(cgit_config_env ? cgit_config_env : CGIT_CONFIG, |
442 | config_cb); |
442 | config_cb); |
| |
443 | ctx.repo = NULL; |
443 | if (getenv("SCRIPT_NAME")) |
444 | if (getenv("SCRIPT_NAME")) |
444 | ctx.cfg.script_name = xstrdup(getenv("SCRIPT_NAME")); |
445 | ctx.cfg.script_name = xstrdup(getenv("SCRIPT_NAME")); |
445 | if (getenv("QUERY_STRING")) |
446 | if (getenv("QUERY_STRING")) |
446 | ctx.qry.raw = xstrdup(getenv("QUERY_STRING")); |
447 | ctx.qry.raw = xstrdup(getenv("QUERY_STRING")); |
447 | cgit_parse_args(argc, argv); |
448 | cgit_parse_args(argc, argv); |
448 | http_parse_querystring(ctx.qry.raw, querystring_cb); |
449 | http_parse_querystring(ctx.qry.raw, querystring_cb); |
449 | if (!cgit_prepare_cache(&item)) |
450 | if (!cgit_prepare_cache(&item)) |
450 | return 0; |
451 | return 0; |
|