Skip to content

Commit 2dee7e6

Browse files
rscharfegitster
authored andcommitted
merge-recursive: use fspathcmp() in path_hashmap_cmp()
Call fspathcmp() instead of open-coding it. This shortens the code and makes it less repetitive. Signed-off-by: René Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c420321 commit 2dee7e6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

merge-recursive.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ static int path_hashmap_cmp(const void *cmp_data,
5555
a = container_of(eptr, const struct path_hashmap_entry, e);
5656
b = container_of(entry_or_key, const struct path_hashmap_entry, e);
5757

58-
if (ignore_case)
59-
return strcasecmp(a->path, key ? key : b->path);
60-
else
61-
return strcmp(a->path, key ? key : b->path);
58+
return fspathcmp(a->path, key ? key : b->path);
6259
}
6360

6461
/*

0 commit comments

Comments
 (0)