Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-11-04 02:32:28 +0300
committerJunio C Hamano <gitster@pobox.com>2015-11-04 02:32:29 +0300
commitf836a32ba75beded3bca960f2918e08309642c62 (patch)
treebf4332f809f98afdde66c5b02e763e6efd975a63 /t
parent04bba3a12b27f592d6d0b8f8af28b2697e55532d (diff)
parent786b150c8d0960cb7c36fb1cbbf70dbd76b586de (diff)
Merge branch 'js/clone-dissociate' into maint
"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')
-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