diff options
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -60,6 +60,8 @@ static void process_cached_repolist(const char *path); | |||
60 | 60 | ||
61 | void repo_config(struct cgit_repo *repo, const char *name, const char *value) | 61 | void repo_config(struct cgit_repo *repo, const char *name, const char *value) |
62 | { | 62 | { |
63 | struct string_list_item *item; | ||
64 | |||
63 | if (!strcmp(name, "name")) | 65 | if (!strcmp(name, "name")) |
64 | repo->name = xstrdup(value); | 66 | repo->name = xstrdup(value); |
65 | else if (!strcmp(name, "clone-url")) | 67 | else if (!strcmp(name, "clone-url")) |
@@ -86,7 +88,10 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value) | |||
86 | repo->max_stats = cgit_find_stats_period(value, NULL); | 88 | repo->max_stats = cgit_find_stats_period(value, NULL); |
87 | else if (!strcmp(name, "module-link")) | 89 | else if (!strcmp(name, "module-link")) |
88 | repo->module_link= xstrdup(value); | 90 | repo->module_link= xstrdup(value); |
89 | else if (!strcmp(name, "section")) | 91 | else if (!prefixcmp(name, "module-link.")) { |
92 | item = string_list_append(&repo->submodules, name + 12); | ||
93 | item->util = xstrdup(value); | ||
94 | } else if (!strcmp(name, "section")) | ||
90 | repo->section = xstrdup(value); | 95 | repo->section = xstrdup(value); |
91 | else if (!strcmp(name, "readme") && value != NULL) | 96 | else if (!strcmp(name, "readme") && value != NULL) |
92 | repo->readme = xstrdup(value); | 97 | repo->readme = xstrdup(value); |
@@ -465,6 +470,7 @@ static int prepare_repo_cmd(struct cgit_context *ctx) | |||
465 | cgit_print_docend(); | 470 | cgit_print_docend(); |
466 | return 1; | 471 | return 1; |
467 | } | 472 | } |
473 | sort_string_list(&ctx->repo->submodules); | ||
468 | cgit_prepare_repo_env(ctx->repo); | 474 | cgit_prepare_repo_env(ctx->repo); |
469 | return 0; | 475 | return 0; |
470 | } | 476 | } |