diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-02-11 16:46:20 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-11 16:46:20 -0800 |
commit | e0197c9aae39b0f1ba6c21d1f6d0bae5de03a44d (patch) | |
tree | 8ce3be12cc0fba866845b18e977c264fbcf54792 /t | |
parent | 3960a951795819e6cd09422e15092b45cdd46f73 (diff) | |
parent | 9cb76b8cdc8ac62a77080595f6443613fd64bab3 (diff) | |
download | git-e0197c9aae39b0f1ba6c21d1f6d0bae5de03a44d.tar.gz git-e0197c9aae39b0f1ba6c21d1f6d0bae5de03a44d.tar.xz |
Merge branch 'lt/in-core-index'
* lt/in-core-index:
lazy index hashing
Create pathname-based hash-table lookup into index
read-cache.c: introduce is_racy_timestamp() helper
read-cache.c: fix a couple more CE_REMOVE conversion
Also use unpack_trees() in do_diff_cache()
Make run_diff_index() use unpack_trees(), not read_tree()
Avoid running lstat(2) on the same cache entry.
index: be careful when handling long names
Make on-disk index representation separate from in-core one
Diffstat (limited to 't')
-rwxr-xr-x | t/t0000-basic.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh index cd0de506d..92de08822 100755 --- a/t/t0000-basic.sh +++ b/t/t0000-basic.sh @@ -309,4 +309,24 @@ test_expect_success 'absolute path works as expected' ' test "$sym" = "$(test-absolute-path $dir2/syml)" ' +test_expect_success 'very long name in the index handled sanely' ' + + a=a && # 1 + a=$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a && # 16 + a=$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a && # 256 + a=$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a && # 4096 + a=${a}q && + + >path4 && + git update-index --add path4 && + ( + git ls-files -s path4 | + sed -e "s/ .*/ /" | + tr -d "\012" + echo "$a" + ) | git update-index --index-info && + len=$(git ls-files "a*" | wc -c) && + test $len = 4098 +' + test_done |