]> git.ipfire.org Git - thirdparty/git.git/commit
loose: refactor object map to operate on `struct odb_source_loose`
authorPatrick Steinhardt <ps@pks.im>
Thu, 21 May 2026 08:22:33 +0000 (10:22 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 21 May 2026 13:35:20 +0000 (22:35 +0900)
commit4cd593f172af1fb9b3a7c43030564cf70d656141
tree5c2a45bf06a1bab2b8d78b847809ad4d98272284
parentff3903737a2d8b7bf21b2c9a8a61a5674aac8d26
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