diff options
Diffstat (limited to 'cgit.c')
| -rw-r--r-- | cgit.c | 14 |
1 files changed, 12 insertions, 2 deletions
| @@ -84,7 +84,12 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value) | |||
| 84 | repo->enable_remote_branches = atoi(value); | 84 | repo->enable_remote_branches = atoi(value); |
| 85 | else if (!strcmp(name, "enable-subject-links")) | 85 | else if (!strcmp(name, "enable-subject-links")) |
| 86 | repo->enable_subject_links = atoi(value); | 86 | repo->enable_subject_links = atoi(value); |
| 87 | else if (!strcmp(name, "max-stats")) | 87 | else if (!strcmp(name, "commit-sort")) { |
| 88 | if (!strcmp(value, "date")) | ||
| 89 | repo->commit_sort = 1; | ||
| 90 | if (!strcmp(value, "topo")) | ||
| 91 | repo->commit_sort = 2; | ||
| 92 | } else if (!strcmp(name, "max-stats")) | ||
| 88 | repo->max_stats = cgit_find_stats_period(value, NULL); | 93 | repo->max_stats = cgit_find_stats_period(value, NULL); |
| 89 | else if (!strcmp(name, "module-link")) | 94 | else if (!strcmp(name, "module-link")) |
| 90 | repo->module_link= xstrdup(value); | 95 | repo->module_link= xstrdup(value); |
| @@ -261,7 +266,12 @@ void config_cb(const char *name, const char *value) | |||
| 261 | ctx.cfg.clone_url = xstrdup(value); | 266 | ctx.cfg.clone_url = xstrdup(value); |
| 262 | else if (!strcmp(name, "local-time")) | 267 | else if (!strcmp(name, "local-time")) |
| 263 | ctx.cfg.local_time = atoi(value); | 268 | ctx.cfg.local_time = atoi(value); |
| 264 | else if (!prefixcmp(name, "mimetype.")) | 269 | else if (!strcmp(name, "commit-sort")) { |
| 270 | if (!strcmp(value, "date")) | ||
| 271 | ctx.cfg.commit_sort = 1; | ||
| 272 | if (!strcmp(value, "topo")) | ||
| 273 | ctx.cfg.commit_sort = 2; | ||
| 274 | } else if (!prefixcmp(name, "mimetype.")) | ||
| 265 | add_mimetype(name + 9, value); | 275 | add_mimetype(name + 9, value); |
| 266 | else if (!strcmp(name, "include")) | 276 | else if (!strcmp(name, "include")) |
| 267 | parse_configfile(expand_macros(value), config_cb); | 277 | parse_configfile(expand_macros(value), config_cb); |
