summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-10 13:47:30 -0800
committerJunio C Hamano <gitster@pobox.com>2013-01-10 13:47:30 -0800
commit63d1cf6526a51d72f5c14cf9f8c72d3cc37762bb (patch)
treeda5660e66f54263a4230352e620e896551c41cf2 /t
parentd912b0e44f82dc430a4aac8566a8217b60629638 (diff)
parent9be1980bb966cb1bc187b62803e6b76087fd5aac (diff)
downloadgit-63d1cf6526a51d72f5c14cf9f8c72d3cc37762bb.tar.gz
Merge branch 'jl/interrupt-clone-remove-separate-git-dir'
When "git clone --separate-git-dir" is interrupted, we failed to remove the real location we created the repository. * jl/interrupt-clone-remove-separate-git-dir: clone: support atomic operation with --separate-git-dir
Diffstat (limited to 't')
-rwxr-xr-xt/t5600-clone-fail-cleanup.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/t/t5600-clone-fail-cleanup.sh b/t/t5600-clone-fail-cleanup.sh
index ee06d28649..4435693bb2 100755
--- a/t/t5600-clone-fail-cleanup.sh
+++ b/t/t5600-clone-fail-cleanup.sh
@@ -37,6 +37,16 @@ test_expect_success \
test_expect_success \
'successful clone must leave the directory' \
- 'cd bar'
+ 'test -d bar'
+
+test_expect_success 'failed clone --separate-git-dir should not leave any directories' '
+ mkdir foo/.git/objects.bak/ &&
+ mv foo/.git/objects/* foo/.git/objects.bak/ &&
+ test_must_fail git clone --separate-git-dir gitdir foo worktree &&
+ test_must_fail test -e gitdir &&
+ test_must_fail test -e worktree &&
+ mv foo/.git/objects.bak/* foo/.git/objects/ &&
+ rmdir foo/.git/objects.bak
+'
test_done