]> Kevux Git Server - rit/commit
loose: refactor object map to operate on `struct odb_source_loose`
authorPatrick Steinhardt <ps@pks.im>
Mon, 1 Jun 2026 08:20:36 +0000 (10:20 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Jun 2026 09:47:18 +0000 (18:47 +0900)
commit87588db131a5c1c33471606860951c9959bbe6ae
tree1739e31cf0d4ad468057e29e668694d4ea310fc4
parentd8b9e8bb23ece128179ad54ed5ecbcd4bd809b1e
loose: refactor object map to operate on `struct odb_source_loose`

While the loose object map functions in "loose.c" accept a generic
`struct odb_source *`, they always expect this to be the "files"
backend. Furthermore, the subsystem doesn't even care about the "files"
backend, but only uses it as a stepping stone to get to the "loose"
backend.

This assumption is implicit and thus not immediately obvious. Refactor
the interfaces to instead operate on a `struct odb_source_loose`
instead, which eliminates the implicit dependency and unnecessary detour
via the "files" source.

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