aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cgit.c b/cgit.c
index 2efa962..d256b14 100644
--- a/cgit.c
+++ b/cgit.c
@@ -153,6 +153,8 @@ static void config_cb(const char *name, const char *value)
ctx.cfg.footer = xstrdup(value);
else if (!strcmp(name, "head-include"))
ctx.cfg.head_include = xstrdup(value);
+ else if (!strcmp(name, "default-index"))
+ ctx.cfg.default_index = xstrdup(value);
else if (!strcmp(name, "header"))
ctx.cfg.header = xstrdup(value);
else if (!strcmp(name, "logo"))
@@ -412,6 +414,7 @@ static void prepare_context(void)
ctx.cfg.summary_tags = 10;
ctx.cfg.max_atom_items = 10;
ctx.cfg.difftype = DIFF_UNIFIED;
+ ctx.cfg.default_index = "summary";
ctx.env.cgit_config = getenv("CGIT_CONFIG");
ctx.env.http_host = getenv("HTTP_HOST");
ctx.env.https = getenv("HTTPS");
@@ -1065,8 +1068,8 @@ int cmd_main(int argc, const char **argv)
prepare_context();
cgit_repolist.length = 0;
- cgit_repolist.count = 0;
cgit_repolist.repos = NULL;
+ cgit_repolist.count = 0;
cgit_parse_args(argc, argv);
parse_configfile(expand_macros(ctx.env.cgit_config), config_cb);