clone: replace strcmp by fspathcmp
authorMatheus Tavares <matheus.bernardino@usp.br>
Wed, 10 Jul 2019 23:59:04 +0000 (20:59 -0300)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Jul 2019 20:52:16 +0000 (13:52 -0700)
Replace the use of strcmp by fspathcmp at copy_or_link_directory, which
is more permissive/friendly to case-insensitive file systems.

Suggested-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/clone.c
index a4ce801a67c54cf3ca8afa63807e8c1ff009ab26..62b6a0a352e8f42b83c03b4a3bd4f445ce280e8a 100644 (file)
@@ -441,7 +441,7 @@ static void copy_or_link_directory(struct strbuf *src, struct strbuf *dest,
                }
 
                /* Files that cannot be copied bit-for-bit... */
-               if (!strcmp(iter->relative_path, "info/alternates")) {
+               if (!fspathcmp(iter->relative_path, "info/alternates")) {
                        copy_alternates(src, src_repo);
                        continue;
                }