diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-01-18 10:05:54 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-18 10:05:54 +0300 |
commit | 6af384ce73ad880253be5be7587f19f6fe3afcba (patch) | |
tree | c63418b88b19af0eb7ca37adfffa49408e57bc79 /t | |
parent | cd1dbd37d950f6592d3b84dc95c3863657c3aa7c (diff) | |
parent | 55892d23981917aefdb387ad7d0429f90cbd446a (diff) |
Merge branch 'ap/clone-into-empty'
* ap/clone-into-empty:
Allow cloning to an existing empty directory
add is_dot_or_dotdot inline function
Diffstat (limited to 't')
-rwxr-xr-x | t/t5601-clone.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh index 78a3fa639c..fe287d31fb 100755 --- a/t/t5601-clone.sh +++ b/t/t5601-clone.sh @@ -125,4 +125,23 @@ test_expect_success 'clone to destination with extra trailing /' ' ' +test_expect_success 'clone to an existing empty directory' ' + mkdir target-3 && + git clone src target-3 && + T=$( cd target-3 && git rev-parse HEAD ) && + S=$( cd src && git rev-parse HEAD ) && + test "$T" = "$S" +' + +test_expect_success 'clone to an existing non-empty directory' ' + mkdir target-4 && + >target-4/Fakefile && + test_must_fail git clone src target-4 +' + +test_expect_success 'clone to an existing path' ' + >target-5 && + test_must_fail git clone src target-5 +' + test_done |