summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-01-18 13:24:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-18 17:53:06 (GMT)
commitd8727b3687c1d249e84be71a581cc1fb0581336a (patch)
tree02bf4c77ad36d0cec37af52ce94fe6a50c9a8fe3 /setup.c
parent77556354bb7ac50450e3b28999e3576969869068 (diff)
downloadgit-d8727b3687c1d249e84be71a581cc1fb0581336a.zip
git-d8727b3687c1d249e84be71a581cc1fb0581336a.tar.gz
git-d8727b3687c1d249e84be71a581cc1fb0581336a.tar.bz2
abspath_part_inside_repo: respect core.ignoreCase
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes https://github.com/git-for-windows/git/issues/735 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/setup.c b/setup.c
index 1be5037..291bfb2 100644
--- a/setup.c
+++ b/setup.c
@@ -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;
}