aboutsummaryrefslogtreecommitdiffstats
path: root/t/test-lib-functions.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-09 15:25:44 -0700
committerJunio C Hamano <gitster@pobox.com>2019-07-09 15:25:44 -0700
commitbf8126fff9cdab2583f1c8b274c0d29ebd000c26 (patch)
treea54d56765bf569cfaefd441630fd10d3b2b3ea29 /t/test-lib-functions.sh
parentMerge branch 'cc/first-contrib-tutorial' (diff)
parentt0001: fix on case-insensitive filesystems (diff)
downloadgit-bf8126fff9cdab2583f1c8b274c0d29ebd000c26.tar.gz
git-bf8126fff9cdab2583f1c8b274c0d29ebd000c26.zip
Merge branch 'js/t0001-case-insensitive'
Test update. * js/t0001-case-insensitive: t0001: fix on case-insensitive filesystems
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r--t/test-lib-functions.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 0367cec5fd..7308f67922 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -908,6 +908,21 @@ test_cmp_rev () {
fi
}
+# Compare paths respecting core.ignoreCase
+test_cmp_fspath () {
+ if test "x$1" = "x$2"
+ then
+ return 0
+ fi
+
+ if test true != "$(git config --get --type=bool core.ignorecase)"
+ then
+ return 1
+ fi
+
+ test "x$(echo "$1" | tr A-Z a-z)" = "x$(echo "$2" | tr A-Z a-z)"
+}
+
# Print a sequence of integers in increasing order, either with
# two arguments (start and end):
#