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/t7008-filter-branch-null-sha1.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 / t7008-filter-branch-null-sha1.sh` 56 lines ยท 1484 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='filter-branch removal of trees with null sha1' 4 5 . ./test-lib.sh 6 7 test_expect_success 'setup: base commits' ' 8 test_commit one && 9 test_commit two && 10 test_commit three 11 ' 12 13 test_expect_success 'setup: a commit with a bogus null sha1 in the tree' ' 14 { 15 git ls-tree HEAD && 16 printf "160000 commit $ZERO_OID\\tbroken\\n" 17 } >broken-tree && 18 echo "add broken entry" >msg && 19 20 tree=$(git mktree expect && 49 git filter-branch \ 50 --force --prune-empty \ 51 --index-filter "git rm --cached --ignore-unmatch broken" && 52 git log -1 --format=%s >actual && 53 test_cmp expect actual 54 ' 55 56 test_done