-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
4 changed files
with
166 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |