summaryrefslogtreecommitdiff
path: root/t/t5700-clone-reference.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-15 15:43:49 -0700
committerJunio C Hamano <gitster@pobox.com>2015-10-15 15:43:49 -0700
commitdb5adf24bf6e0380d4b4ce97f88b4f874773f424 (patch)
tree463ceaa1553402eaab35e2ed4602314a12fd5fcd /t/t5700-clone-reference.sh
parentb80dd559c99ad8afa2d9ec513b18048257547593 (diff)
parent786b150c8d0960cb7c36fb1cbbf70dbd76b586de (diff)
downloadgit-db5adf24bf6e0380d4b4ce97f88b4f874773f424.tar.gz
Merge branch 'js/clone-dissociate'
"git clone --dissociate" runs a big "git repack" process at the end, and it helps to close file descriptors that are open on the packs and their idx files before doing so on filesystems that cannot remove a file that is still open. * js/clone-dissociate: clone --dissociate: avoid locking pack files sha1_file.c: add a function to release all packs sha1_file: consolidate code to close a pack's file descriptor t5700: demonstrate a Windows file locking issue with `git clone --dissociate`
Diffstat (limited to 't/t5700-clone-reference.sh')
-rwxr-xr-xt/t5700-clone-reference.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t5700-clone-reference.sh b/t/t5700-clone-reference.sh
index ef1779f5ca..2250ef4fe2 100755
--- a/t/t5700-clone-reference.sh
+++ b/t/t5700-clone-reference.sh
@@ -188,5 +188,26 @@ test_expect_success 'clone and dissociate from reference' '
test_must_fail git -C R fsck &&
git -C S fsck
'
+test_expect_success 'clone, dissociate from partial reference and repack' '
+ rm -fr P Q R &&
+ git init P &&
+ (
+ cd P &&
+ test_commit one &&
+ git repack &&
+ test_commit two &&
+ git repack
+ ) &&
+ git clone --bare P Q &&
+ (
+ cd P &&
+ git checkout -b second &&
+ test_commit three &&
+ git repack
+ ) &&
+ git clone --bare --dissociate --reference=P Q R &&
+ ls R/objects/pack/*.pack >packs.txt &&
+ test_line_count = 1 packs.txt
+'
test_done