diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-07-22 13:00:31 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-07-22 13:00:32 -0700 |
commit | 9ea5c632da283ff8c2dea8176cd34f1c8618d6c4 (patch) | |
tree | 98c421927ea754c8eeb2733a5ec7dc09825a1cdc /t | |
parent | Merge branch 'vr/use-our-perl-in-tests' into maint (diff) | |
parent | git-checkout: disallow --detach on unborn branch (diff) | |
download | tgif-9ea5c632da283ff8c2dea8176cd34f1c8618d6c4.tar.xz |
Merge branch 'cw/no-detaching-an-unborn' into maint
"git checkout --detach", when you are still on an unborn branch,
should be forbidden, but it wasn't.
* cw/no-detaching-an-unborn:
git-checkout: disallow --detach on unborn branch
Diffstat (limited to 't')
-rwxr-xr-x | t/t2017-checkout-orphan.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t2017-checkout-orphan.sh b/t/t2017-checkout-orphan.sh index 0e3b8582f2..655f278c5f 100755 --- a/t/t2017-checkout-orphan.sh +++ b/t/t2017-checkout-orphan.sh @@ -116,4 +116,10 @@ test_expect_success '--orphan refuses to switch if a merge is needed' ' git reset --hard ' +test_expect_success 'cannot --detach on an unborn branch' ' + git checkout master && + git checkout --orphan new && + test_must_fail git checkout --detach +' + test_done |