diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2014-11-30 15:24:50 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-01 11:00:17 -0800 |
commit | 3b8925c78bdbea49c846e350e66c13923441fff8 (patch) | |
tree | 7059b1c0fd97b4b32319ad1c8239ca012a76232d /t | |
parent | 5883034c61c60e04db16520a759ec67a34ffaea3 (diff) | |
download | git-3b8925c78bdbea49c846e350e66c13923441fff8.tar.gz |
checkout: clean up half-prepared directories in --to mode
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-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 && |