pack-bitmap-write.c: write lookup table extension
commit93eb41e2403788fa9105211956e87b6b2c22c68c
authorAbhradeep Chakraborty <chakrabortyabhradeep79@gmail.com>
Sun, 14 Aug 2022 16:55:08 +0000 (14 16:55 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 26 Aug 2022 17:13:50 +0000 (26 10:13 -0700)
treeee7ac5eb7f69c7aed6b7d17ae3dc89d11177802a
parentaa30162559ab6c5be0181853cbc07d777675d82a
pack-bitmap-write.c: write lookup table extension

The bitmap lookup table extension was documented by an earlier
change, but Git does not yet know how to write that extension.

Teach Git to write bitmap lookup table extension. The table contains
the list of `N` <commit_pos, offset, xor_row>` triplets. These
triplets are sorted according to their commit pos (ascending order).
The meaning of each data in the i'th triplet is given below:

  - commit_pos stores commit position (in the pack-index or midx).
    It is a 4 byte network byte order unsigned integer.

  - offset is the position (in the bitmap file) from which that
    commit's bitmap can be read.

  - xor_row is the position of the triplet in the lookup table
    whose bitmap is used to compress this bitmap, or `0xffffffff`
    if no such bitmap exists.

Mentored-by: Taylor Blau <me@ttaylorr.com>
Co-mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Co-authored-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Abhradeep Chakraborty <chakrabortyabhradeep79@gmail.com>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pack-bitmap-write.c
pack-bitmap.h