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 <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

René Scharfe committed Aug 28, 2021 at 23:30 UTC 2dee7e61053ada0197512b71e02581857e2f1b50
1 file changed +1 -4
merge-recursive.c
+1 -4
@@ -55,10 +55,7 @@ static int path_hashmap_cmp(const void *cmp_data,
55 a = container_of(eptr, const struct path_hashmap_entry, e);
56 b = container_of(entry_or_key, const struct path_hashmap_entry, e);
57
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);
59 }
60
61 /*