Skip to content

Commit 11911bf

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 74b6763 commit 11911bf

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

t/t5700-clone-reference.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,5 +214,26 @@ test_expect_success 'clone and dissociate from reference' '
214214
test_must_fail git -C R fsck &&
215215
git -C S fsck
216216
'
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+
'
217238

218239
test_done

0 commit comments

Comments
 (0)