diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-12-13 22:53:08 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-13 22:53:08 -0800 |
commit | b2dd02112052aff875e8dc7d12b9915c91feafe2 (patch) | |
tree | 575640076625dbc13dd950e78f8c0ab5f23e2b06 /t/t2018-checkout-branch.sh | |
parent | a96a89f7153150c7e59d5481dd22773173b5a877 (diff) | |
parent | 39bd6f726109942c6f77f59638f6763c9f00706c (diff) | |
download | git-b2dd02112052aff875e8dc7d12b9915c91feafe2.tar.gz |
Merge branch 'jn/branch-move-to-self'
* jn/branch-move-to-self:
Allow checkout -B <current-branch> to update the current branch
branch: allow a no-op "branch -M <current-branch> HEAD"
Diffstat (limited to 't/t2018-checkout-branch.sh')
-rwxr-xr-x | t/t2018-checkout-branch.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/t/t2018-checkout-branch.sh b/t/t2018-checkout-branch.sh index 75874e85df..2741262369 100755 --- a/t/t2018-checkout-branch.sh +++ b/t/t2018-checkout-branch.sh @@ -189,12 +189,13 @@ test_expect_success 'checkout -b <describe>' ' 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 |