write_reused_pack_verbatim(): convert to new revindex API

Replace a direct access to the revindex array with
'pack_pos_to_offset()'.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Taylor Blau 2021-01-13 17:23:43 -05:00 committed by Junio C Hamano
parent 66cbd3e2fb
commit 6a5c10c45f
1 changed files with 1 additions and 1 deletions

View File

@ -952,7 +952,7 @@ static size_t write_reused_pack_verbatim(struct hashfile *out,
off_t to_write; off_t to_write;


written = (pos * BITS_IN_EWORD); written = (pos * BITS_IN_EWORD);
to_write = reuse_packfile->revindex[written].offset to_write = pack_pos_to_offset(reuse_packfile, written)
- sizeof(struct pack_header); - sizeof(struct pack_header);


/* We're recording one chunk, not one object. */ /* We're recording one chunk, not one object. */