]> git.ipfire.org Git - thirdparty/git.git/commitdiff
write_reused_pack_verbatim(): convert to new revindex API
authorTaylor Blau <me@ttaylorr.com>
Wed, 13 Jan 2021 22:23:43 +0000 (17:23 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Jan 2021 05:53:45 +0000 (21:53 -0800)
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>
builtin/pack-objects.c

index 8e40b19ee8a6296d21234aac12d4c713f4649a3a..77ce5583a29ff13cf47b5dd0bdc14ca270a58f6a 100644 (file)
@@ -952,7 +952,7 @@ static size_t write_reused_pack_verbatim(struct hashfile *out,
                off_t to_write;
 
                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);
 
                /* We're recording one chunk, not one object. */