diff options
author | justanothercatgirl <sotov@twistea.su> | 2025-04-02 21:00:51 +0200 |
---|---|---|
committer | justanothercatgirl <sotov@twistea.su> | 2025-04-02 21:00:51 +0200 |
commit | d946c8cf11385f5766e827ae71b3fc798750a335 (patch) | |
tree | 52105e039563e264cbaf84a0bda6cd1df7945b30 /cgit.c | |
parent | 09d24d7cd0b7e85633f2f43808b12871bb209d69 (diff) |
Note: currently breaks repos that contain no readme
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); |