summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-22 18:12:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-04-22 18:12:40 (GMT)
commitfd6d822e847f88d016cb608d6b76a3914f372c66 (patch)
tree36d276214d5506687eaed0198c8367b9a0fd271d /t
parent561954bfa1c1a1c5a76ca59001da331c73c5c141 (diff)
parentb552b56df2c13885a67ca9ec9f76c21d3b7e2cde (diff)
downloadgit-fd6d822e847f88d016cb608d6b76a3914f372c66.zip
git-fd6d822e847f88d016cb608d6b76a3914f372c66.tar.gz
git-fd6d822e847f88d016cb608d6b76a3914f372c66.tar.bz2
Merge branch 'as/clone-reference-with-gitfile'
"git clone" did not work if a repository pointed at by the "--reference" option is a gitfile that points at another place. * as/clone-reference-with-gitfile: clone: Allow repo using gitfile as a reference clone: Fix error message for reference repository
Diffstat (limited to 't')
-rwxr-xr-xt/t5700-clone-reference.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t5700-clone-reference.sh b/t/t5700-clone-reference.sh
index 60f1552..6537911 100755
--- a/t/t5700-clone-reference.sh
+++ b/t/t5700-clone-reference.sh
@@ -185,4 +185,17 @@ test_expect_success 'fetch with incomplete alternates' '
! grep " want $tag_object" "$U.K"
'
+test_expect_success 'clone using repo with gitfile as a reference' '
+ git clone --separate-git-dir=L A M &&
+ git clone --reference=M A N &&
+ echo "$base_dir/L/objects" >expected &&
+ test_cmp expected "$base_dir/N/.git/objects/info/alternates"
+'
+
+test_expect_success 'clone using repo pointed at by gitfile as reference' '
+ git clone --reference=M/.git A O &&
+ echo "$base_dir/L/objects" >expected &&
+ test_cmp expected "$base_dir/O/.git/objects/info/alternates"
+'
+
test_done