config: document the settings to colorize push errors/hints
[git/debian.git] / t / t1601-index-bogus.sh
blob73cc9323cdc2a40105bd6218983381b8a72b381a
1 #!/bin/sh
3 test_description='test handling of bogus index entries'
4 . ./test-lib.sh
6 test_expect_success 'create tree with null sha1' '
7 tree=$(printf "160000 commit $_z40\\tbroken\\n" | git mktree)
10 test_expect_success 'read-tree refuses to read null sha1' '
11 test_must_fail git read-tree $tree
14 test_expect_success 'GIT_ALLOW_NULL_SHA1 overrides refusal' '
15 GIT_ALLOW_NULL_SHA1=1 git read-tree $tree
18 test_expect_success 'git write-tree refuses to write null sha1' '
19 test_must_fail git write-tree
22 test_done