aboutsummaryrefslogtreecommitdiff
path: root/t/t5601-clone.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-22 18:05:15 -0700
committerJunio C Hamano <gitster@pobox.com>2011-08-22 18:57:20 -0700
commitdbc92b072dd7023f8ba1f682a8060022fc72504a (patch)
tree2b935124666866f9d8b9702ad60a123962c4a26c /t/t5601-clone.sh
parentf696543dad6c7ba27b0c4fab167a5687263a9ba0 (diff)
downloadgit-dbc92b072dd7023f8ba1f682a8060022fc72504a.tar.gz
git-dbc92b072dd7023f8ba1f682a8060022fc72504a.tar.xz
clone: allow more than one --reference
Also add a test to expose a long-standing bug that is triggered when cloning with --reference option from a local repository that has its own alternates. The alternate object stores specified on the command line are lost, and only alternates copied from the source repository remain. The bug will be fixed in the next patch. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5601-clone.sh')
-rwxr-xr-xt/t5601-clone.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index 151ea531b..0163ad1e2 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -207,4 +207,19 @@ test_expect_success 'clone separate gitdir where target already exists' '
test_must_fail git clone --separate-git-dir realgitdir src dst
'
+test_expect_failure 'clone --reference from original' '
+ git clone --shared --bare src src-1 &&
+ git clone --bare src src-2 &&
+ git clone --reference=src-2 --bare src-1 target-8 &&
+ grep /src-2/ target-8/objects/info/alternates
+'
+
+test_expect_success 'clone with more than one --reference' '
+ git clone --bare src src-3 &&
+ git clone --bare src src-4 &&
+ git clone --reference=src-3 --reference=src-4 src target-9 &&
+ grep /src-3/ target-9/.git/objects/info/alternates &&
+ grep /src-4/ target-9/.git/objects/info/alternates
+'
+
test_done