diff options
Diffstat (limited to 't/t2025-checkout-to.sh')
-rwxr-xr-x | t/t2025-checkout-to.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t2025-checkout-to.sh b/t/t2025-checkout-to.sh index edd34049cf..e2db07859b 100755 --- a/t/t2025-checkout-to.sh +++ b/t/t2025-checkout-to.sh @@ -17,6 +17,12 @@ test_expect_success 'checkout --to an existing worktree' ' test_must_fail git checkout --detach --to existing master ' +test_expect_success 'checkout --to refuses to checkout locked branch' ' + test_must_fail git checkout --to zere master && + ! test -d zere && + ! test -d .git/worktrees/zere +' + test_expect_success 'checkout --to a new worktree' ' git rev-parse HEAD >expect && git checkout --detach --to here master && |