aboutsummaryrefslogtreecommitdiffstats
path: root/parallel-checkout.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-11-23 19:59:38 +0100
committerJunio C Hamano <gitster@pobox.com>2025-11-23 12:56:45 -0800
commitc26da3446e98ad4aa98ec9154c70c6fd35cb9ad6 (patch)
tree0d49eeae98907ce7139f3c47ae8f27e02570cb6d /parallel-checkout.c
parent4c89d31494bff4bde6079a0e0821f1437e37d07b (diff)
downloadgit-c26da3446e98ad4aa98ec9154c70c6fd35cb9ad6.tar.gz
streaming: get rid of `the_repository`
Subsequent commits will move the backend-specific logic of object streaming into their respective subsystems. These subsystems have gotten rid of `the_repository` already, but we still use it in two locations in the streaming subsystem. Prepare for the move by fixing those two cases. Converting the logic in `open_istream_pack_non_delta()` is trivial as we already got the object database as input. But for `stream_blob_to_fd()` we have to add a new parameter to make it accessible. So, as we already have to adjust all callers anyway, rename the function to `odb_stream_blob_to_fd()` to indicate it's part of the object subsystem. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parallel-checkout.c')
-rw-r--r--parallel-checkout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/parallel-checkout.c b/parallel-checkout.c
index fba6aa65a6..1cb6701b92 100644
--- a/parallel-checkout.c
+++ b/parallel-checkout.c
@@ -281,7 +281,8 @@ static int write_pc_item_to_fd(struct parallel_checkout_item *pc_item, int fd,
filter = get_stream_filter_ca(&pc_item->ca, &pc_item->ce->oid);
if (filter) {
- if (stream_blob_to_fd(fd, &pc_item->ce->oid, filter, 1)) {
+ if (odb_stream_blob_to_fd(the_repository->objects, fd,
+ &pc_item->ce->oid, filter, 1)) {
/* On error, reset fd to try writing without streaming */
if (reset_fd(fd, path))
return -1;