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/t3103-ls-tree-misc.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 / t3103-ls-tree-misc.sh` 40 lines ยท 895 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description=' 4 Miscellaneous tests for git ls-tree. 5 6 1. git ls-tree fails in presence of tree damage. 7 8 ' 9 10 . ./test-lib.sh 11 12 test_expect_success 'setup' ' 13 mkdir a && 14 touch a/one && 15 git add a/one && 16 git commit -m test 17 ' 18 19 test_expect_success 'ls-tree fails with non-zero exit code on broken tree' ' 20 tree=$(git rev-parse HEAD:a) && 21 rm -f .git/objects/$(echo $tree | sed -e "s,^\(..\),\1/,") && 22 test_must_fail git ls-tree -r HEAD 23 ' 24 25 for opts in \ 26 "--long --name-only" \ 27 "--name-only --name-status" \ 28 "--name-status --object-only" \ 29 "--object-only --long" 30 do 31 test_expect_success "usage: incompatible options: $opts" ' 32 test_expect_code 129 git ls-tree $opts $tree 33 ' 34 35 one_opt=$(echo "$opts" | cut -d' ' -f1) 36 test_expect_success "usage: incompatible options: $one_opt and --format" ' 37 test_expect_code 129 git ls-tree $one_opt --format=fmt $tree 38 ' 39 done 40 test_done