test_must_fail git -C r5 pack-objects --rev --stdout 2>bad_tree <<-EOF &&
HEAD
EOF
- grep -q "bad tree object" bad_tree
+ grep "bad tree object" bad_tree
'
test_expect_success 'setup for tests of tree:0' '
xargs -n1 git -C dst cat-file -t >fetched_types &&
sort -u fetched_types >unique_types.observed &&
- printf "blob\ncommit\ntree\n" >unique_types.expected &&
+ test_write_lines blob commit tree >unique_types.expected &&
test_cmp unique_types.expected unique_types.observed
'
awk -f print_2.awk) &&
git -C r1 rev-list --objects --filter=blob:none HEAD $file_3 >observed &&
- grep -q "$file_3" observed &&
- test_must_fail grep -q "$file_4" observed
+ grep "$file_3" observed &&
+ ! grep "$file_4" observed
'
test_expect_success 'verify emitted+omitted == all' '
xargs -n1 git -C r3 cat-file -t >unsorted_filtered_types &&
sort -u unsorted_filtered_types >filtered_types &&
- printf "blob\ntree\n" >expected &&
+ test_write_lines blob tree >expected &&
test_cmp expected filtered_types
'