Skip to content

Commit c4d9c50

Browse files
matheustavaresgitster
authored andcommitted
clone: replace strcmp by fspathcmp
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 <[email protected]> Signed-off-by: Matheus Tavares <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ff7ccc8 commit c4d9c50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/clone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ static void copy_or_link_directory(struct strbuf *src, struct strbuf *dest,
441441
}
442442

443443
/* Files that cannot be copied bit-for-bit... */
444-
if (!strcmp(iter->relative_path, "info/alternates")) {
444+
if (!fspathcmp(iter->relative_path, "info/alternates")) {
445445
copy_alternates(src, src_repo);
446446
continue;
447447
}

0 commit comments

Comments
 (0)