aboutsummaryrefslogtreecommitdiffstats
path: root/unix-socket.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-11-23 19:59:28 +0100
committerJunio C Hamano <gitster@pobox.com>2025-11-23 12:56:44 -0800
commit3f64deabdf0a2a9664acec61698affc449e07496 (patch)
treef76bd3a7bb827117db6be19476ad96a422fcef11 /unix-socket.c
parent70c8b5f5453b9f128a72fad4398acfb9e7d869c4 (diff)
downloadgit-3f64deabdf0a2a9664acec61698affc449e07496.tar.gz
streaming: propagate final object type via the stream
When opening the read stream for a specific object the caller is also expected to pass in a pointer to the object type. This type is passed down via multiple levels and will eventually be populated with the type of the looked-up object. The way we propagate down the pointer though is somewhat non-obvious. While `istream_source()` still expects the pointer and looks it up via `odb_read_object_info_extended()`, we also pass it down even further into the format-specific callbacks that perform another lookup. This is quite confusing overall. Refactor the code so that the responsibility to populate the object type rests solely with the format-specific callbacks. This will allow us to drop the call to `odb_read_object_info_extended()` in `istream_source()` entirely in a subsequent patch. Furthermore, instead of propagating the type via an in-pointer, we now propagate the type via a new field in the object stream. It already has a `size` field, so it's only natural to have a second field that contains the object type. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'unix-socket.c')
0 files changed, 0 insertions, 0 deletions