summaryrefslogtreecommitdiff
path: root/www-apps
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2023-10-12 08:51:15 +0000
committerdakkar <dakkar@thenautilus.net>2023-10-12 08:51:15 +0000
commit614a400ff21f27fdd0603293a98db3034c4861d7 (patch)
treec5465b29838cc791a2294902072748a8ae9742d7 /www-apps
downloadportage-patches-614a400ff21f27fdd0603293a98db3034c4861d7.tar.gz
portage-patches-614a400ff21f27fdd0603293a98db3034c4861d7.tar.bz2
portage-patches-614a400ff21f27fdd0603293a98db3034c4861d7.zip
from luxion
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/cgit-1.2.3/submodule-case.patch30
-rw-r--r--www-apps/cgit-1.2.3/submodules-cache.patch31
2 files changed, 61 insertions, 0 deletions
diff --git a/www-apps/cgit-1.2.3/submodule-case.patch b/www-apps/cgit-1.2.3/submodule-case.patch
new file mode 100644
index 0000000..89665e2
--- /dev/null
+++ b/www-apps/cgit-1.2.3/submodule-case.patch
@@ -0,0 +1,30 @@
+Subject: [PATCH] shared: compare submodules case-insensitively
+
+If module-link is read from a repository's Git config, then our callback
+is invoked with the name converted to lower case (as all Git config keys
+are). This means we can never match a submodule containing uppercase
+characters against such a module-link.
+
+Compare submodule names case-insensitively to avoid this problem. This
+may break a use case where two submodules differ only in case, but that
+is much less likely than a submodule name using uppercase characters.
+
+Signed-off-by: John Keeping <john@keeping.me.uk>
+---
+ shared.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/shared.c b/shared.c
+index 609bd2a..777618d 100644
+--- a/shared.c
++++ b/shared.c
+@@ -77,6 +77,7 @@ struct cgit_repo *cgit_add_repo(const char *url)
+ ret->owner_filter = ctx.cfg.owner_filter;
+ ret->clone_url = ctx.cfg.clone_url;
+ ret->submodules.strdup_strings = 1;
++ ret->submodules.cmp = strcasecmp;
+ ret->hide = ret->ignore = 0;
+ return ret;
+ }
+--
+2.28.0
diff --git a/www-apps/cgit-1.2.3/submodules-cache.patch b/www-apps/cgit-1.2.3/submodules-cache.patch
new file mode 100644
index 0000000..e440cf9
--- /dev/null
+++ b/www-apps/cgit-1.2.3/submodules-cache.patch
@@ -0,0 +1,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
+