diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-08-10 23:05:04 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-08-10 23:05:04 -0700 |
commit | fa548703d1e60231828266856467d3d73ac51f0f (patch) | |
tree | 3ca496e49fefa959aaa0300d0e5cd7016f87715f /t | |
parent | 566b5c057c452d04605805ea2f7af210c6fb9b59 (diff) | |
parent | 3d5c418ff56645e13bdbd8c9f7d84fdaf7c8494b (diff) | |
download | git-fa548703d1e60231828266856467d3d73ac51f0f.tar.gz git-fa548703d1e60231828266856467d3d73ac51f0f.tar.xz |
Merge branch 'jc/clone'
* jc/clone:
git-clone: aggressively optimize local clone behaviour.
connect: accept file:// URL scheme
Diffstat (limited to 't')
-rwxr-xr-x | t/t5500-fetch-pack.sh | 2 | ||||
-rwxr-xr-x | t/t5700-clone-reference.sh | 2 | ||||
-rwxr-xr-x | t/t5701-clone-local.sh | 17 |
3 files changed, 19 insertions, 2 deletions
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh index 7da515361..7b6798d8b 100755 --- a/t/t5500-fetch-pack.sh +++ b/t/t5500-fetch-pack.sh @@ -129,7 +129,7 @@ pull_to_client 2nd "B" $((64*3)) pull_to_client 3rd "A" $((1*3)) # old fails -test_expect_success "clone shallow" "git-clone --depth 2 . shallow" +test_expect_success "clone shallow" "git-clone --depth 2 file://`pwd`/. shallow" (cd shallow; git count-objects -v) > count.shallow diff --git a/t/t5700-clone-reference.sh b/t/t5700-clone-reference.sh index 6d4325259..4e93aaab0 100755 --- a/t/t5700-clone-reference.sh +++ b/t/t5700-clone-reference.sh @@ -51,7 +51,7 @@ diff expected current' cd "$base_dir" test_expect_success 'cloning with reference (no -l -s)' \ -'git clone --reference B A D' +'git clone --reference B file://`pwd`/A D' cd "$base_dir" diff --git a/t/t5701-clone-local.sh b/t/t5701-clone-local.sh index b0933274d..a3026ec4f 100755 --- a/t/t5701-clone-local.sh +++ b/t/t5701-clone-local.sh @@ -43,4 +43,21 @@ test_expect_success 'local clone from x.git that does not exist' ' fi ' +test_expect_success 'With -no-hardlinks, local will make a copy' ' + cd "$D" && + git clone --bare --no-hardlinks x w && + cd w && + linked=$(find objects -type f ! -links 1 | wc -l) && + test "$linked" = 0 +' + +test_expect_success 'Even without -l, local will make a hardlink' ' + cd "$D" && + rm -fr w && + git clone -l --bare x w && + cd w && + copied=$(find objects -type f -links 1 | wc -l) && + test "$copied" = 0 +' + test_done |