Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t1601-index-bogus.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t1601-index-bogus.sh` 23 lines ยท 523 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='test handling of bogus index entries' 4 5 . ./test-lib.sh 6 7 test_expect_success 'create tree with null sha1' ' 8 tree=$(printf "160000 commit $ZERO_OID\\tbroken\\n" | git mktree) 9 ' 10 11 test_expect_success 'read-tree refuses to read null sha1' ' 12 test_must_fail git read-tree $tree 13 ' 14 15 test_expect_success 'GIT_ALLOW_NULL_SHA1 overrides refusal' ' 16 GIT_ALLOW_NULL_SHA1=1 git read-tree $tree 17 ' 18 19 test_expect_success 'git write-tree refuses to write null sha1' ' 20 test_must_fail git write-tree 21 ' 22 23 test_done