]> git.ipfire.org Git - thirdparty/git.git/commitdiff
for_each_object_in_pack(): convert to new revindex API
authorTaylor Blau <me@ttaylorr.com>
Wed, 13 Jan 2021 22:24:49 +0000 (17:24 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Jan 2021 05:53:47 +0000 (21:53 -0800)
Avoid looking at the 'revindex' pointer directly and instead call
'pack_pos_to_index()'.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
packfile.c

index 936ab3def53a3af1a0f42944874de483ef8f6601..7bb1750934982345b432272e39c5ad5b3d29c2e4 100644 (file)
@@ -2086,7 +2086,7 @@ int for_each_object_in_pack(struct packed_git *p,
                struct object_id oid;
 
                if (flags & FOR_EACH_OBJECT_PACK_ORDER)
-                       pos = p->revindex[i].nr;
+                       pos = pack_pos_to_index(p, i);
                else
                        pos = i;