Skip to content

Commit

Permalink
t3211: demonstrate loss of peeled refs if a packed ref is deleted
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Haggerty authored and Junio C Hamano committed May 1, 2013
1 parent 506a760 commit c995de6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions t/t3211-peel-ref.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,13 @@ test_expect_success 'refs are peeled outside of refs/tags (old packed)' '
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

0 comments on commit c995de6

Please sign in to comment.