]> git.ipfire.org Git - thirdparty/git.git/commit
odb/source-loose: wire up `read_object_info()` callback
authorPatrick Steinhardt <ps@pks.im>
Thu, 21 May 2026 08:22:26 +0000 (10:22 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 21 May 2026 13:35:19 +0000 (22:35 +0900)
commitba45c6c20b164111653a3731dc2bcb5b8ababb59
tree5de4d65556ac6ddce94dba93f98a4eacd8b1e3d7
parentf9405b3bd138668b83d948798f342eedbc92bb61
odb/source-loose: wire up `read_object_info()` callback

Move `odb_source_loose_read_object_info()` from "object-file.c" into
"odb/source-loose.c" and wire it up as the `read_object_info()` callback
of the loose source. Callers that previously invoked it directly now go
through the generic `odb_source_read_object_info()` interface instead.

The function `read_object_info_from_path()` cannot be moved along with
it because it is still called by `for_each_object_wrapper_cb()`. It is
therefore kept in place, but adjusted to take a loose source to clarify
that it's always operating on this structure.

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