summaryrefslogtreecommitdiff
path: root/t/t5700-clone-reference.sh
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2015-10-22 16:41:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-10-22 19:13:29 (GMT)
commit0181681e921fa4e001a51886749ee0584233db51 (patch)
treea57631f96bb7748d5f86a0602a93ddfc5ee4a8de /t/t5700-clone-reference.sh
parent74301d6edeb0e081a4ef864057952b6a7ff2b4be (diff)
downloadgit-0181681e921fa4e001a51886749ee0584233db51.zip
git-0181681e921fa4e001a51886749ee0584233db51.tar.gz
git-0181681e921fa4e001a51886749ee0584233db51.tar.bz2
clone: allow "--dissociate" without reference
The "--reference" option is not the only way to provide a repository to borrow objects from. A repository that borrows from another repository can be cloned with "clone --local" and the resulting repository will borrow from the same repository, which the user may want to "--dissociate" from. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5700-clone-reference.sh')
-rwxr-xr-xt/t5700-clone-reference.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t5700-clone-reference.sh b/t/t5700-clone-reference.sh
index 2250ef4..dfa1bf7 100755
--- a/t/t5700-clone-reference.sh
+++ b/t/t5700-clone-reference.sh
@@ -210,4 +210,15 @@ test_expect_success 'clone, dissociate from partial reference and repack' '
test_line_count = 1 packs.txt
'
+test_expect_success 'clone, dissociate from alternates' '
+ rm -fr A B C &&
+ test_create_repo A &&
+ commit_in A file1 &&
+ git clone --reference=A A B &&
+ test_line_count = 1 B/.git/objects/info/alternates &&
+ git clone --local --dissociate B C &&
+ ! test -f C/.git/objects/info/alternates &&
+ ( cd C && git fsck )
+'
+
test_done