summaryrefslogtreecommitdiffstats
path: root/pack-bitmap.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-04-14 17:35:04 +0200
committerJunio C Hamano <gitster@pobox.com>2018-04-16 12:38:58 +0900
commit06af3bba414b832fe9e04fb959daa2b9b678d2d5 (patch)
tree046541620f73e0ba8ab322c20190252bbff4955d /pack-bitmap.c
parentb5c0cbd8083f71e071207fca0d5434c6db6ff6c9 (diff)
downloadgit-06af3bba414b832fe9e04fb959daa2b9b678d2d5.tar.gz
git-06af3bba414b832fe9e04fb959daa2b9b678d2d5.tar.xz
pack-objects: move in_pack_pos out of struct object_entry
This field is only need for pack-bitmap, which is an optional feature. Move it to a separate array that is only allocated when pack-bitmap is used (like objects[], it is not freed, since we need it until the end of the process) Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap.c')
-rw-r--r--pack-bitmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-bitmap.c b/pack-bitmap.c
index 3f2dab340..c9e90d1bb 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -1033,7 +1033,7 @@ int rebuild_existing_bitmaps(struct packing_data *mapping,
oe = packlist_find(mapping, sha1, NULL);
if (oe)
- reposition[i] = oe->in_pack_pos + 1;
+ reposition[i] = oe_in_pack_pos(mapping, oe) + 1;
}
rebuild = bitmap_new();