diff options
| author | saturneric <[email protected]> | 2025-11-08 12:59:52 +0000 |
|---|---|---|
| committer | saturneric <[email protected]> | 2025-11-08 12:59:52 +0000 |
| commit | e91a9108868ff9ea6de1a33ef459971093249a8d (patch) | |
| tree | 70f60700cee2ab851c235811300f0a8133bea08e | |
| parent | chore(ci): update Docker setup and image sources (diff) | |
| download | cgit-e91a9108868ff9ea6de1a33ef459971093249a8d.tar.gz cgit-e91a9108868ff9ea6de1a33ef459971093249a8d.zip | |
fix(ui): normalize clone URLs to lowercase
* Convert generated clone URLs to lowercase to improve compatibility
with case-insensitive filesystems and protocols.
* Prevent issues caused by inconsistent URL casing in downstream tools.
| -rw-r--r-- | ui-shared.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c index 7c5a19c..4e39938 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -922,6 +922,12 @@ static void add_clone_urls(void (*fn)(const char *), char *txt, char *suffix) continue; if (suffix && *suffix) strbuf_addf(url_list[i], "/%s", suffix); + + /* Normalize to lowercase for the benefit of case-insensitive + * filesystems and protocols. */ + for (char *p = url_list[i]->buf; *p; p++) + *p = tolower((unsigned char)*p); + fn(url_list[i]->buf); } |
