diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-08-28 21:19:21 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-28 21:19:21 -0700 |
commit | 2478bd8318c3ad6eceb7b99f01db29499f63b759 (patch) | |
tree | 348ff68ae5741134d1b8ee2e8ad174f18e853ab3 /t | |
parent | Merge branch 'jk/color-and-pager' (diff) | |
parent | clone: clone from a repository with relative alternates (diff) | |
download | tgif-2478bd8318c3ad6eceb7b99f01db29499f63b759.tar.xz |
Merge branch 'jc/maint-clone-alternates'
* jc/maint-clone-alternates:
clone: clone from a repository with relative alternates
clone: allow more than one --reference
Conflicts:
builtin/clone.c
Diffstat (limited to 't')
-rwxr-xr-x | t/t5601-clone.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh index 151ea531bd..d87214cfbf 100755 --- a/t/t5601-clone.sh +++ b/t/t5601-clone.sh @@ -207,4 +207,27 @@ test_expect_success 'clone separate gitdir where target already exists' ' test_must_fail git clone --separate-git-dir realgitdir src dst ' +test_expect_success '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_expect_success 'clone from original with relative alternate' ' + mkdir nest && + git clone --bare src nest/src-5 && + echo ../../../src/.git/objects >nest/src-5/objects/info/alternates && + git clone --bare nest/src-5 target-10 && + grep /src/\\.git/objects target-10/objects/info/alternates +' + test_done |