aboutsummaryrefslogtreecommitdiff
path: root/t/t5601-clone.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-04-01 17:57:37 -0700
committerJunio C Hamano <gitster@pobox.com>2011-04-01 17:57:37 -0700
commitc4b2ce69534e1d51f71142ba0e463ed89605ccd1 (patch)
tree6cb1a1c828b387e14e2e39fc931892a609725527 /t/t5601-clone.sh
parentffc5e3c958b66fb4babeba01483cc924bc2957a5 (diff)
parentb57fb80a7d7d19102b31ab94a28ed43ea1ee07bb (diff)
downloadgit-c4b2ce69534e1d51f71142ba0e463ed89605ccd1.tar.gz
git-c4b2ce69534e1d51f71142ba0e463ed89605ccd1.tar.xz
Merge branch 'nd/init-gitdir'
* nd/init-gitdir: init, clone: support --separate-git-dir for .git file git-init.txt: move description section up Conflicts: builtin/clone.c
Diffstat (limited to 't/t5601-clone.sh')
-rwxr-xr-xt/t5601-clone.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index a92d145be..5a068b21e 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -191,4 +191,17 @@ test_expect_success 'do not respect url-encoding of non-url path' '
git clone x+y xy-regular
'
+test_expect_success 'clone separate gitdir' '
+ rm -rf dst &&
+ git clone --separate-git-dir realgitdir src dst &&
+ echo "gitdir: `pwd`/realgitdir" >expected &&
+ test_cmp expected dst/.git &&
+ test -d realgitdir/refs
+'
+
+test_expect_success 'clone separate gitdir where target already exists' '
+ rm -rf dst &&
+ test_must_fail git clone --separate-git-dir realgitdir src dst
+'
+
test_done