Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-18 10:05:54 +0300
committerJunio C Hamano <gitster@pobox.com>2009-01-18 10:05:54 +0300
commit6af384ce73ad880253be5be7587f19f6fe3afcba (patch)
treec63418b88b19af0eb7ca37adfffa49408e57bc79 /t
parentcd1dbd37d950f6592d3b84dc95c3863657c3aa7c (diff)
parent55892d23981917aefdb387ad7d0429f90cbd446a (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-xt/t5601-clone.sh19
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