summaryrefslogtreecommitdiff
path: root/contrib/persistent-https
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-07-17 11:32:09 +0200
committerJunio C Hamano <gitster@pobox.com>2026-07-18 19:03:48 -0700
commit215d305f450ff0691d15daaa6ef72f77e8441b39 (patch)
tree4834de70b6bf6a46e7dba474abde5dc16ea627e6 /contrib/persistent-https
parent9306f4f379923bc22480d11921fffe4bf13013b4 (diff)
odb: compute compat object ID in `odb_write_object_ext()`
Repositories can have a compatibility hash configured, which means that such a repository is expected to maintain a mapping between canonical and compatibility object hashes. Maintaining this mapping is the responsibility of the object database sources, where we either store them as part of the loose objects map or in packfile indices v3 (once we gain support for this feature). But besides storing these compatibility hashes, the sources are also responsible for generating the compatibility hash in the first place. This is somewhat unnecessary though, as the compatibility hash should be computed the same no matter which source is being used. The consequence is that we need to duplicate this functionality across the different backends, which does not make a lot of sense. Refactor the code so that we instead compute the compatibility hash in `odb_write_object_ext()` and then pass the computed value to the sources. No callers need adjustment as there are none that write objects via the source interfaces directly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions