t5308: test reverse indexes with duplicate objects
A non-strict .idx has one entry for each object in the pack, even when multiple entries have the same object ID. Thus a pack ordered A, B, A, C has two .idx entries for A at distinct offsets. The corresponding per-pack reverse index must represent both entries and map them back to physical pack order. Existing reverse-index tests do not cover packs with duplicate objects. Add one and check that %(objectsize:disk) for B stops at the second A, rather than extending through it to C. Exercise both the on-disk and in-memory reverse-index implementations. As part of validating Git's handling of packs containing duplicate objects, cover their per-pack reverse indexes. Signed-off-by: Taylor Blau <ttaylorr@openai.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>