midx: add entries to write_midx_context
commit31bda9a237b363574bd8a5bd98f86bdeb6ced1e6
authorDerrick Stolee <dstolee@microsoft.com>
Thu, 18 Feb 2021 14:07:28 +0000 (18 14:07 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Feb 2021 21:38:16 +0000 (18 13:38 -0800)
treea5d7e0ac98f5a6fd6f8f99e9ac58ec1ce97cba5d
parentb4d941420bce15cd48bccabc1faa90477bda2fae
midx: add entries to write_midx_context

In an effort to align write_midx_internal() with the chunk-format API,
continue to group necessary data into "struct write_midx_context". This
change collects the "struct pack_midx_entry *entries" list and its count
into the context.

Update write_midx_oid_fanout() and write_midx_oid_lookup() to take the
context directly, as these are easy conversions with this new data.

Only the callers of write_midx_object_offsets() and
write_midx_large_offsets() are updated here, since additional data in
the context before those methods can match chunk_write_fn.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
midx.c