diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-03-16 16:47:26 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-03-16 16:47:26 -0700 |
commit | 8209b7fb9beecdeb47180b57b2dfe1666ec27f82 (patch) | |
tree | 1f4539f46c24a7f1fc2401ef1728f3440e668e31 /t | |
parent | 61a6f1faecf19d7727bdfae012a14747c672cb1a (diff) | |
parent | a9026187923643235d4f9b876ff5f4c0ebe5c9ae (diff) | |
download | git-8209b7fb9beecdeb47180b57b2dfe1666ec27f82.tar.gz git-8209b7fb9beecdeb47180b57b2dfe1666ec27f82.tar.xz |
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-x | t/t5701-clone-local.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t5701-clone-local.sh b/t/t5701-clone-local.sh index 0f4d487be..6972258b2 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 |