From 11911bf7c4b4346013be9eefad257a009b659dd2 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 5 Oct 2015 22:29:59 +0200 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- t/t5700-clone-reference.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/t/t5700-clone-reference.sh b/t/t5700-clone-reference.sh index 3e783fc450..b6c056619c 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 -- 2.11.4.GIT