Skip to content

Commit c995de6

Browse files
mhaggergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 506a760 commit c995de6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

t/t3211-peel-ref.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,13 @@ test_expect_success 'refs are peeled outside of refs/tags (old packed)' '
6161
test_cmp expect actual
6262
'
6363

64+
test_expect_failure 'peeled refs survive deletion of packed ref' '
65+
git pack-refs --all &&
66+
cp .git/packed-refs fully-peeled &&
67+
git branch yadda &&
68+
git pack-refs --all &&
69+
git branch -d yadda &&
70+
test_cmp fully-peeled .git/packed-refs
71+
'
72+
6473
test_done

0 commit comments

Comments
 (0)