diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-02-06 01:26:15 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-02-06 01:26:15 +0300 |
commit | ff09c9e5bad8971d25e7e2039836c9d42797e30a (patch) | |
tree | 093abbba8166ea63ab56c9b755c7476ab009a2c2 /setup.c | |
parent | 9c96ab987243724915fedd7ea051438b8e553e07 (diff) | |
parent | d8727b3687c1d249e84be71a581cc1fb0581336a (diff) |
Merge branch 'js/abspath-part-inside-repo'
On a case-insensitive filesystem, we failed to compare the part of
the path that is above the worktree directory in an absolute
pathname, which has been corrected.
* js/abspath-part-inside-repo:
abspath_part_inside_repo: respect core.ignoreCase
Diffstat (limited to 'setup.c')
-rw-r--r-- | setup.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -39,7 +39,7 @@ static int abspath_part_inside_repo(char *path) off = offset_1st_component(path); /* check if work tree is already the prefix */ - if (wtlen <= len && !strncmp(path, work_tree, wtlen)) { + if (wtlen <= len && !fspathncmp(path, work_tree, wtlen)) { if (path[wtlen] == '/') { memmove(path, path + wtlen + 1, len - wtlen); return 0; @@ -59,7 +59,7 @@ static int abspath_part_inside_repo(char *path) path++; if (*path == '/') { *path = '\0'; - if (strcmp(real_path(path0), work_tree) == 0) { + if (fspathcmp(real_path(path0), work_tree) == 0) { memmove(path0, path + 1, len - (path - path0)); return 0; } @@ -68,7 +68,7 @@ static int abspath_part_inside_repo(char *path) } /* check whole path */ - if (strcmp(real_path(path0), work_tree) == 0) { + if (fspathcmp(real_path(path0), work_tree) == 0) { *path0 = '\0'; return 0; } |