summaryrefslogtreecommitdiff
path: root/www-apps/cgit-1.2.3/submodule-case.patch
blob: 89665e2849cfdf04dacb32a82a5a2b9a5a0c131d (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
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