Skip to content

Commit

Permalink
t5700: demonstrate a Windows file locking issue with `git clone --dis…
Browse files Browse the repository at this point in the history
…sociate`

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>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Oct 5, 2015
1 parent 74b6763 commit 11911bf
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions t/t5700-clone-reference.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 11911bf

Please sign in to comment.