summaryrefslogtreecommitdiff
path: root/www-apps/cgit-1.2.3/submodules-cache.patch
blob: e440cf95a4846fd0fe5d5c8d51831266c32ee92a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 9c8f12809a7727b19a111d717b27143c4e2001bd Mon Sep 17 00:00:00 2001
From: dakkar <dakkar@thenautilus.net>
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 <dakkar@thenautilus.net>
---
 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