diff options
Diffstat (limited to 't/t2025-checkout-to.sh')
-rwxr-xr-x | t/t2025-checkout-to.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/t2025-checkout-to.sh b/t/t2025-checkout-to.sh index eddd3251f1..915b506b6c 100755 --- a/t/t2025-checkout-to.sh +++ b/t/t2025-checkout-to.sh @@ -13,10 +13,15 @@ test_expect_success 'checkout --to not updating paths' ' ' test_expect_success 'checkout --to an existing worktree' ' - mkdir existing && + mkdir -p existing/subtree && test_must_fail git checkout --detach --to existing master ' +test_expect_success 'checkout --to an existing empty worktree' ' + mkdir existing_empty && + git checkout --detach --to existing_empty master +' + test_expect_success 'checkout --to refuses to checkout locked branch' ' test_must_fail git checkout --to zere master && ! test -d zere && |