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>

Johannes Schindelin committed Oct 5, 2015 at 22:29 UTC 11911bf7c4b4346013be9eefad257a009b659dd2
1 file changed +21
t/t5700-clone-reference.sh
+21
@@ -214,5 +214,26 @@ test_expect_success 'clone and dissociate from reference' '
214 test_must_fail git -C R fsck &&
215 git -C S fsck
216 '
217 +test_expect_failure MINGW 'clone, dissociate from partial reference and repack' '
218 + rm -fr P Q R &&
219 + git init P &&
220 + (
221 + cd P &&
222 + test_commit one &&
223 + git repack &&
224 + test_commit two &&
225 + git repack
226 + ) &&
227 + git clone --bare P Q &&
228 + (
229 + cd P &&
230 + git checkout -b second &&
231 + test_commit three &&
232 + git repack
233 + ) &&
234 + git clone --bare --dissociate --reference=P Q R &&
235 + ls R/objects/pack/*.pack >packs.txt &&
236 + test_line_count = 1 packs.txt
237 +'
238
239 test_done