summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-04-01 08:59:53 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-04-01 08:59:53 -0700
commitc044bed8f0ed0275792cf66201579e42c0de7171 (patch)
treef39c9e19c58b25b9e88a25f3f5648fd496d7a1b6 /t
parentMerge branch 'jk/common-make-variables-export-safety' (diff)
parentname-hash.c: fix endless loop with core.ignorecase=true (diff)
downloadtgif-c044bed8f0ed0275792cf66201579e42c0de7171.tar.xz
Merge branch 'kb/name-hash'
The code to keep track of what directory names are known to Git on platforms with case insensitive filesystems can get confused upon a hash collision between these pathnames and looped forever. * kb/name-hash: name-hash.c: fix endless loop with core.ignorecase=true
Diffstat (limited to 't')
-rwxr-xr-xt/t7062-wtstatus-ignorecase.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t7062-wtstatus-ignorecase.sh b/t/t7062-wtstatus-ignorecase.sh
new file mode 100755
index 0000000000..73709dbeee
--- /dev/null
+++ b/t/t7062-wtstatus-ignorecase.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+test_description='git-status with core.ignorecase=true'
+
+. ./test-lib.sh
+
+test_expect_success 'status with hash collisions' '
+ # note: "V/", "V/XQANY/" and "WURZAUP/" produce the same hash code
+ # in name-hash.c::hash_name
+ mkdir V &&
+ mkdir V/XQANY &&
+ mkdir WURZAUP &&
+ touch V/XQANY/test &&
+ git config core.ignorecase true &&
+ git add . &&
+ # test is successful if git status completes (no endless loop)
+ git status
+'
+
+test_done