3 test_description
='test handling of bogus index entries'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success
'create tree with null sha1' '
9 tree=$(printf "160000 commit $ZERO_OID\\tbroken\\n" | git mktree)
12 test_expect_success
'read-tree refuses to read null sha1' '
13 test_must_fail git read-tree $tree
16 test_expect_success
'GIT_ALLOW_NULL_SHA1 overrides refusal' '
17 GIT_ALLOW_NULL_SHA1=1 git read-tree $tree
20 test_expect_success
'git write-tree refuses to write null sha1' '
21 test_must_fail git write-tree