]> git.ipfire.org Git - thirdparty/git.git/commit
pack-objects: pass `bitmapped_pack`'s to pack-reuse functions
authorTaylor Blau <me@ttaylorr.com>
Thu, 14 Dec 2023 22:24:12 +0000 (17:24 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Dec 2023 22:38:08 +0000 (14:38 -0800)
commit073b40eba0064ad3bd9bfad89a050208bc033890
treee201ae4be22a081e6a80786491b74c729771ad3e
parentd1d701eb9ce2293588aabf34c69335d49640f968
pack-objects: pass `bitmapped_pack`'s to pack-reuse functions

Further prepare pack-objects to perform verbatim pack-reuse over
multiple packfiles by converting functions that take in a pointer to a
`struct packed_git` to instead take in a pointer to a `struct
bitmapped_pack`.

The additional information found in the bitmapped_pack struct (such as
the bit position corresponding to the beginning of the pack) will be
necessary in order to perform verbatim pack-reuse.

Note that we don't use any of the extra pieces of information contained
in the bitmapped_pack struct, so this step is merely preparatory and
does not introduce any functional changes.

Note further that we do not change the argument type to
write_reused_pack_one(). That function is responsible for copying
sections of the packfile directly and optionally patching any OFS_DELTAs
to account for not reusing sections of the packfile in between a delta
and its base.

As such, that function is (and should remain) oblivious to multi-pack
reuse, and does not require any of the extra pieces of information
stored in the bitmapped_pack struct.

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