Message ID | 15d7520479f412d13de17c323311aba077043bf8.1661192802.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 308cbaa0829f6c039728b521153e63928934681e |
Headers | show |
Series | tests: fix broken &&-chains & abort loops on error | expand |
diff --git a/t/t2407-worktree-heads.sh b/t/t2407-worktree-heads.sh index 50815acd3e8..019a40df2ca 100755 --- a/t/t2407-worktree-heads.sh +++ b/t/t2407-worktree-heads.sh @@ -41,10 +41,10 @@ test_expect_success 'setup' ' test_expect_success 'refuse to overwrite: checked out in worktree' ' for i in 1 2 3 4 do - test_must_fail git branch -f wt-$i HEAD 2>err + test_must_fail git branch -f wt-$i HEAD 2>err && grep "cannot force update the branch" err && - test_must_fail git branch -D wt-$i 2>err + test_must_fail git branch -D wt-$i 2>err && grep "Cannot delete branch" err || return 1 done '