summaryrefslogtreecommitdiff
path: root/t/t5700-clone-reference.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2015-10-05 20:29:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-10-05 21:43:44 (GMT)
commit11911bf7c4b4346013be9eefad257a009b659dd2 (patch)
treedf51217ce6ab4d07b0d3bfaa7ecbb52208e0fa51 /t/t5700-clone-reference.sh
parent74b67638166ca2e66497ede559dbf393e7af8b40 (diff)
downloadgit-11911bf7c4b4346013be9eefad257a009b659dd2.zip
git-11911bf7c4b4346013be9eefad257a009b659dd2.tar.gz
git-11911bf7c4b4346013be9eefad257a009b659dd2.tar.bz2
t5700: demonstrate a Windows file locking issue with `git clone --dissociate`
On Windows, dissociating from a reference can fail very easily due to pack files that are still in use when they want to be removed. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 3e783fc..b6c0566 100755
--- a/t/t5700-clone-reference.sh
+++ b/t/t5700-clone-reference.sh
@@ -214,5 +214,26 @@ test_expect_success 'clone and dissociate from reference' '
test_must_fail git -C R fsck &&
git -C S fsck
'
+test_expect_failure MINGW '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