Various test updates.
* ab/tests-various-fixup:
rm tests: actually test for SIGPIPE in SIGPIPE test
archive tests: use a cheaper "zipinfo -h" invocation to get header
upload-pack tests: avoid a non-zero "grep" exit status
git-svn tests: rewrite brittle tests to use "--[no-]merges".
git svn mergeinfo tests: refactor "test -z" to use test_must_be_empty
git svn mergeinfo tests: modernize redirection & quoting style
cache-tree tests: explicitly test HEAD and index differences
cache-tree tests: use a sub-shell with less indirection
cache-tree tests: remove unused $2 parameter
cache-tree tests: refactor for modern test style
@ -102,9 +86,20 @@ test_expect_success 'git-add in subdir does not invalidate sibling cache-tree' '
@@ -102,9 +86,20 @@ test_expect_success 'git-add in subdir does not invalidate sibling cache-tree' '
test_commit dir1/a &&
test_commit dir2/b &&
echo "I changed this file" >dir1/a &&
test_when_finished "rm before" &&
cat >before <<-\EOF &&
SHA (3 entries, 2 subtrees)
SHA dir1/ (1 entries, 0 subtrees)
SHA dir2/ (1 entries, 0 subtrees)
EOF
cmp_cache_tree before &&
echo "I changed this file" >dir1/a &&
git add dir1/a &&
cat >expect <<-\EOF &&
invalid (2 subtrees)
invalid dir1/ (0 subtrees)
SHA dir2/ (1 entries, 0 subtrees)
EOF
cmp_cache_tree expect
'
@ -133,6 +128,7 @@ test_expect_success 'second commit has cache-tree' '
@@ -133,6 +128,7 @@ test_expect_success 'second commit has cache-tree' '
'
test_expect_success PERL 'commit --interactive gives cache-tree on partial commit' '
@ -243,7 +243,7 @@ test_expect_success 'refresh index before checking if it is up-to-date' '
@@ -243,7 +243,7 @@ test_expect_success 'refresh index before checking if it is up-to-date' '
test_path_is_missing frotz/nitfol
'
test_expect_success 'choking "git rm" should not let it die with cruft' '
@ -252,12 +252,24 @@ test_expect_success 'choking "git rm" should not let it die with cruft' '
@@ -252,12 +252,24 @@ test_expect_success 'choking "git rm" should not let it die with cruft' '
do
echo "100644 $hash 0 some-file-$i"
i=$(( $i + 1 ))
done | git update-index --index-info &&
done | git update-index --index-info
}
test_expect_success 'choking "git rm" should not let it die with cruft (induce SIGPIPE)' '
choke_git_rm_setup &&
# git command is intentionally placed upstream of pipe to induce SIGPIPE
git rm -n "some-file-*" | : &&
test_path_is_missing .git/index.lock
'
test_expect_success !MINGW 'choking "git rm" should not let it die with cruft (induce and check SIGPIPE)' '