X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/e152aab36c48466d9a65baa26d477688a2536ffb..ca2160163b2a8209e5b04e155a8f4dafbe9334c8:/t/t1000-branch-create.sh diff --git a/t/t1000-branch-create.sh b/t/t1000-branch-create.sh index cca5504..848686c 100755 --- a/t/t1000-branch-create.sh +++ b/t/t1000-branch-create.sh @@ -13,31 +13,14 @@ Exercises the "stg branch" commands. stg init 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 ) -' - -test_expect_success \ 'Create a spurious patches/ entry' ' find .git -name foo | xargs rm -rf && - touch .git/patches/foo + mkdir -p .git/patches && touch .git/patches/foo ' -test_expect_failure \ +test_expect_success \ 'Try to create an stgit branch with a spurious patches/ entry' ' - stg branch -c foo + ! stg branch -c foo ' test_expect_success \ @@ -52,9 +35,9 @@ test_expect_success \ cp .git/refs/heads/master .git/refs/heads/foo ' -test_expect_failure \ +test_expect_success \ 'Try to create an stgit branch with an existing git branch by that name' ' - stg branch -c foo + ! stg branch -c foo ' test_expect_success \ @@ -69,15 +52,4 @@ test_expect_success \ touch .git/refs/heads/foo ' -test_expect_failure \ - 'Try to create an stgit branch with an invalid refs/heads/ 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/heads/foo" && - ( grep foo .git/HEAD; test $? = 1 ) -' - test_done