summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-03-16 23:47:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-03-16 23:47:26 (GMT)
commit8209b7fb9beecdeb47180b57b2dfe1666ec27f82 (patch)
tree1f4539f46c24a7f1fc2401ef1728f3440e668e31 /t
parent61a6f1faecf19d7727bdfae012a14747c672cb1a (diff)
parenta9026187923643235d4f9b876ff5f4c0ebe5c9ae (diff)
downloadgit-8209b7fb9beecdeb47180b57b2dfe1666ec27f82.zip
git-8209b7fb9beecdeb47180b57b2dfe1666ec27f82.tar.gz
git-8209b7fb9beecdeb47180b57b2dfe1666ec27f82.tar.bz2
Merge branch 'jk/fail-null-clone' into maint
* jk/fail-null-clone: clone: die when trying to clone missing local path
Diffstat (limited to 't')
-rwxr-xr-xt/t5701-clone-local.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t5701-clone-local.sh b/t/t5701-clone-local.sh
index 0f4d487..6972258 100755
--- a/t/t5701-clone-local.sh
+++ b/t/t5701-clone-local.sh
@@ -144,4 +144,17 @@ test_expect_success 'clone empty repository, and then push should not segfault.'
test_must_fail git push)
'
+test_expect_success 'cloning non-existent directory fails' '
+ cd "$D" &&
+ rm -rf does-not-exist &&
+ test_must_fail git clone does-not-exist
+'
+
+test_expect_success 'cloning non-git directory fails' '
+ cd "$D" &&
+ rm -rf not-a-git-repo not-a-git-repo-clone &&
+ mkdir not-a-git-repo &&
+ test_must_fail git clone not-a-git-repo not-a-git-repo-clone
+'
+
test_done