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