]> git.ipfire.org Git - thirdparty/git.git/commit
bitmap: move `get commit positions` code to `bitmap_writer_finish`
authorAbhradeep Chakraborty <chakrabortyabhradeep79@gmail.com>
Sun, 14 Aug 2022 16:55:07 +0000 (16:55 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 26 Aug 2022 17:13:47 +0000 (10:13 -0700)
commitaa30162559ab6c5be0181853cbc07d777675d82a
tree5fcacc2840ac7ba31b8ef47d64e2798183eb9de8
parente9977b12fdd64a9c5d7d0aff10709e043181ca7b
bitmap: move `get commit positions` code to `bitmap_writer_finish`

The `write_selected_commits_v1` function takes care of writing commit
positions along with their corresponding bitmaps in the disk. It is
OK because this `search commit position of a given commit` algorithm
is needed only once here. But in later changes of the `lookup table
extension series`, we need same commit positions which means we have
to run the above mentioned algorithm one more time.

Move the `search commit position of a given commit` algorithm to
`bitmap_writer_finish()` and use the `commit_positions` array
to get commit positions of their corresponding bitmaps.

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