X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft2018-checkout-branch.sh;h=2741262369e40a05cdc6732e4c9e6f04acb63bba;hb=39af78961d8e7f4c0aee73e77e9eb5b6033f79c2;hp=75874e85dfbcae8ea9634693a93524841b741559;hpb=c510259c02b46d5edb84568ee9eb0967b25bb75b;p=git.git diff --git a/t/t2018-checkout-branch.sh b/t/t2018-checkout-branch.sh index 75874e85d..274126236 100755 --- a/t/t2018-checkout-branch.sh +++ b/t/t2018-checkout-branch.sh @@ -189,12 +189,13 @@ test_expect_success 'checkout -b ' ' test_cmp expect actual ' -test_expect_success 'checkout -B to the current branch fails before merging' ' +test_expect_success 'checkout -B to the current branch works' ' git checkout branch1 && + git checkout -B branch1-scratch && + setup_dirty_mergeable && - git commit -mfooble && - test_must_fail git checkout -B branch1 initial && - test_must_fail test_dirty_mergeable + git checkout -B branch1-scratch initial && + test_dirty_mergeable ' test_done