Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-10 01:25:44 +0300
committerJunio C Hamano <gitster@pobox.com>2019-07-10 01:25:44 +0300
commitbf8126fff9cdab2583f1c8b274c0d29ebd000c26 (patch)
treea54d56765bf569cfaefd441630fd10d3b2b3ea29 /t/test-lib-functions.sh
parent3e6c6b7787b66116f1533043c2e2cf840c6d0f3e (diff)
parented33bd8f305fd62c87059aa227b99d2411e8eabc (diff)
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):
#