Merge branch 'tg/split-index-fixes'
The split-index mode had a few corner case bugs fixed. * tg/split-index-fixes: travis: run tests with GIT_TEST_SPLIT_INDEX split-index: don't write cache tree with null oid entries read-cache: fix reading the shared index for other repos
This commit is contained in:
@ -401,4 +401,23 @@ done <<\EOF
|
||||
0642 -rw-r---w-
|
||||
EOF
|
||||
|
||||
test_expect_success 'writing split index with null sha1 does not write cache tree' '
|
||||
git config core.splitIndex true &&
|
||||
git config splitIndex.maxPercentChange 0 &&
|
||||
git commit -m "commit" &&
|
||||
{
|
||||
git ls-tree HEAD &&
|
||||
printf "160000 commit $_z40\\tbroken\\n"
|
||||
} >broken-tree &&
|
||||
echo "add broken entry" >msg &&
|
||||
|
||||
tree=$(git mktree <broken-tree) &&
|
||||
test_tick &&
|
||||
commit=$(git commit-tree $tree -p HEAD <msg) &&
|
||||
git update-ref HEAD "$commit" &&
|
||||
GIT_ALLOW_NULL_SHA1=1 git reset --hard &&
|
||||
(test-dump-cache-tree >cache-tree.out || true) &&
|
||||
test_line_count = 0 cache-tree.out
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user