Merge branch 'ds/close-object-store' into maint
[gitweb.git] / t / test-lib-functions.sh
index 8270de74beafb931f09f296557406c0d158d48de..f233522f43ab39728e3c454258920283f5d9cab3 100644 (file)
@@ -888,6 +888,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):
 #