(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'pack should notice missing commit objects'>)} spids: [4] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (C {<test_expect_success>} {<setup>} { (SQ <'\n'> <'\tfor i in 1 2 3 4 5\n'> <'\tdo\n'> <'\t\techo "$i" >"file$i" &&\n'> <'\t\tgit add "file$i" &&\n'> <'\t\ttest_tick &&\n'> <'\t\tgit commit -m "$i" &&\n'> <'\t\tgit tag "tag$i"\n'> <'\tdone &&\n'> <'\tobj=$(git rev-parse --verify tag3) &&\n'> <'\tfanout=$(expr "$obj" : "\\(..\\)") &&\n'> <'\tremainder=$(expr "$obj" : "..\\(.*\\)") &&\n'> <'\trm -f ".git/objects/$fanout/$remainder"\n'> ) } ) (C {<test_expect_success>} {(SQ <'check corruption'>)} {(SQ <'\n'> <'\ttest_must_fail git fsck\n'>)}) (C {<test_expect_success>} {(SQ <'rev-list notices corruption (1)'>)} {(SQ <'\n'> <'\ttest_must_fail git rev-list HEAD\n'>)} ) (C {<test_expect_success>} {(SQ <'rev-list notices corruption (2)'>)} {(SQ <'\n'> <'\ttest_must_fail git rev-list --objects HEAD\n'>)} ) (C {<test_expect_success>} {(SQ <'pack-objects notices corruption'>)} {(SQ <'\n'> <'\techo HEAD |\n'> <'\ttest_must_fail git pack-objects --revs pack\n'>)} ) (C {<test_done>}) ] )