X-Git-Url: https://git.uis.cam.ac.uk/x/uis/git/git.git/blobdiff_plain/7e44d8055c76d4e8291d6dae289ebccab1e72aab..b0e0fc267bfb270b0ccf48ff17179c9c315dc2a9:/t/t1700-split-index.sh diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh index af9b847761..c087b63367 100755 --- a/t/t1700-split-index.sh +++ b/t/t1700-split-index.sh @@ -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 cache-tree.out || true) && + test_line_count = 0 cache-tree.out +' + test_done