diff options
author | gennyble <gen@nyble.dev> | 2023-12-16 07:43:48 -0600 |
---|---|---|
committer | gennyble <gen@nyble.dev> | 2023-12-16 07:43:48 -0600 |
commit | 733a517036bc5ad3327b41f494b0d09cd2470262 (patch) | |
tree | 4581a25c2fd60c7e5ef075c6aad788fd1575bfbe /cgit.c | |
parent | fad097a08e55c9eec0fa86efec72de4426674ca2 (diff) | |
download | cgit-pink-733a517036bc5ad3327b41f494b0d09cd2470262.tar.gz cgit-pink-733a517036bc5ad3327b41f494b0d09cd2470262.zip |
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cgit.c b/cgit.c index dd28a79..a501298 100644 --- a/cgit.c +++ b/cgit.c @@ -258,7 +258,9 @@ static void config_cb(const char *name, const char *value) else if (!strcmp(name, "repository-sort")) ctx.cfg.repository_sort = xstrdup(value); else if (!strcmp(name, "section-sort")) - ctx.cfg.section_sort = atoi(value); + ctx.cfg.section_sort = xstrdup(value); + else if (!strcmp(name, "section-order")) + string_list_append(&ctx.cfg.section_order, xstrdup(value)); else if (!strcmp(name, "source-filter")) ctx.cfg.source_filter = cgit_new_filter(value, SOURCE); else if (!strcmp(name, "summary-log")) @@ -401,7 +403,7 @@ static void prepare_context(void) ctx.cfg.script_name = CGIT_SCRIPT_NAME; ctx.cfg.section = ""; ctx.cfg.repository_sort = "name"; - ctx.cfg.section_sort = 1; + ctx.cfg.section_sort = "name"; ctx.cfg.summary_branches = 10; ctx.cfg.summary_log = 10; ctx.cfg.summary_tags = 10; |