summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2021-01-13 17:25:10 -0500
committerJunio C Hamano <gitster@pobox.com>2021-01-13 21:53:48 -0800
commite5dcd7841828fd4c03dfc8a5c52691ada979b7e2 (patch)
tree843c88476e50896f179d590fdff70ccd6c2ef9f0 /commit.h
parentd5bc7c60c72ee239b5c5d3e4aa808d29412f78d8 (diff)
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 'commit.h')
0 files changed, 0 insertions, 0 deletions