+test_expect_failure \
+ 'Check that no part of the branch was created' '
+ test "$(find .git -name foo3 | tee /dev/stderr \
+ | grep -v ^\\.git/refs/heads/foo3$ | wc -l)" = 0 &&
+ test "$(git show-ref | grep foo3 | wc -l)" = 0 &&
+ test "$(git symbolic-ref HEAD)" = "refs/heads/master"
+'
+
+# Workaround for the test failure to make the rest of the subtests
+# succeed. (HEAD was erroneously overwritten with the bad foo3 ref, so
+# we need to reset it.)
+git symbolic-ref HEAD refs/heads/master
+