]> git.ipfire.org Git - thirdparty/git.git/commit
loose: write loose objects map via their source
authorPatrick Steinhardt <ps@pks.im>
Thu, 17 Jul 2025 04:56:34 +0000 (06:56 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Jul 2025 05:16:15 +0000 (22:16 -0700)
commit0f9b18935745fcdebcad613a6e3e52db5b29b1d4
tree321254d37ee0e0935d33f86c376361b0dc5a76de
parentcbb388f3e53660c88220c40a8dddb976672ae03d
loose: write loose objects map via their source

When a repository is configured to have a compatibility hash algorithm
we keep track of object ID mappings for loose objects via the loose
object map. This map simply maps an object ID of the actual hash to the
object ID of the compatibility hash. This loose object map is an
inherent property of the loose files backend and thus of one specific
object source.

Refactor the interfaces to reflect this by requiring a `struct
odb_source` as input instead of a repository. This prepares for
subsequent commits where we will refactor writing of loose objects to
work on a `struct odb_source`, as well.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
loose.c
loose.h
object-file.c