t3211: demonstrate loss of peeled refs if a packed ref is deleted
Add a test that demonstrates that the peeled values recorded in packed-refs are lost if a packed ref is deleted. (The code in repack_without_ref() doesn't even attempt to write peeled refs.) This will be fixed in a moment. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
506a760db8
commit
c995de61cd
@ -61,4 +61,13 @@ test_expect_success 'refs are peeled outside of refs/tags (old packed)' '
|
|||||||
test_cmp expect actual
|
test_cmp expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_failure 'peeled refs survive deletion of packed ref' '
|
||||||
|
git pack-refs --all &&
|
||||||
|
cp .git/packed-refs fully-peeled &&
|
||||||
|
git branch yadda &&
|
||||||
|
git pack-refs --all &&
|
||||||
|
git branch -d yadda &&
|
||||||
|
test_cmp fully-peeled .git/packed-refs
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
Reference in New Issue
Block a user