-test_expect_success \
- 'Create a spurious refs/patches/ entry' '
- find .git -name foo | xargs rm -rf &&
- touch .git/refs/patches/foo
-'
-
-test_expect_failure \
- 'Try to create an stgit branch with a spurious refs/patches/ entry' '
- stg branch -c foo
-'
-
-test_expect_success \
- 'Check that no part of the branch was created' '
- test "`find .git -name foo | tee /dev/stderr`" = ".git/refs/patches/foo" &&
- ( grep foo .git/HEAD; test $? = 1 )
-'
-