summaryrefslogtreecommitdiff
path: root/t/t2010-checkout-ambiguous.sh
diff options
context:
space:
mode:
authorLibravatar Taylor Blau <me@ttaylorr.com>2021-01-13 17:25:10 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-01-13 21:53:48 -0800
commite5dcd7841828fd4c03dfc8a5c52691ada979b7e2 (patch)
tree843c88476e50896f179d590fdff70ccd6c2ef9f0 /t/t2010-checkout-ambiguous.sh
parentpack-revindex: hide the definition of 'revindex_entry' (diff)
downloadtgif-e5dcd7841828fd4c03dfc8a5c52691ada979b7e2.tar.xz
pack-revindex.c: avoid direct revindex access in 'offset_to_pack_pos()'
To prepare for on-disk reverse indexes, remove a spot in 'offset_to_pack_pos()' that looks at the 'revindex' array in 'struct packed_git'. Even though this use of the revindex pointer is within pack-revindex.c, this clean up is still worth doing. Since the 'revindex' pointer will be NULL when reading from an on-disk reverse index (instead the 'revindex_data' pointer will be mmaped to the 'pack-*.rev' file), this call-site would have to include a conditional to lookup the offset for position 'mi' each iteration through the search. So instead of open-coding 'pack_pos_to_offset()', call it directly from within 'offset_to_pack_pos()'. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2010-checkout-ambiguous.sh')
0 files changed, 0 insertions, 0 deletions