From 9c8f12809a7727b19a111d717b27143c4e2001bd Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 26 Mar 2022 10:39:45 +0000 Subject: [PATCH] cgit.c: teach repo config printing about per-path module-link This prevented path-specific module-links from working when cache was enabled, since the cache repo config didn't include them. Signed-off-by: Gianni Ceccarelli --- cgit.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cgit.c b/cgit.c index 08d81a1..ae3a66e 100644 --- a/cgit.c +++ b/cgit.c @@ -810,6 +810,10 @@ static void print_repo(FILE *f, struct cgit_repo *repo) fprintf(f, "repo.extra-head-content=%s\n", repo->extra_head_content); if (repo->module_link) fprintf(f, "repo.module-link=%s\n", repo->module_link); + for_each_string_list_item(item, &repo->submodules) { + if (item->util) + fprintf(f, "repo.module-link.%s=%s\n", item->string, (char*)item->util); + } if (repo->section) fprintf(f, "repo.section=%s\n", repo->section); if (repo->homepage) -- 2.34.1