mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
4c89d31494
commit
c26da3446e
@@ -584,7 +584,7 @@ static int show_blob_object(const struct object_id *oid, struct rev_info *rev, c
|
||||
fflush(rev->diffopt.file);
|
||||
if (!rev->diffopt.flags.textconv_set_via_cmdline ||
|
||||
!rev->diffopt.flags.allow_textconv)
|
||||
return stream_blob_to_fd(1, oid, NULL, 0);
|
||||
return odb_stream_blob_to_fd(the_repository->objects, 1, oid, NULL, 0);
|
||||
|
||||
if (get_oid_with_context(the_repository, obj_name,
|
||||
GET_OID_RECORD_PATH,
|
||||
@@ -594,7 +594,7 @@ static int show_blob_object(const struct object_id *oid, struct rev_info *rev, c
|
||||
!textconv_object(the_repository, obj_context.path,
|
||||
obj_context.mode, &oidc, 1, &buf, &size)) {
|
||||
object_context_release(&obj_context);
|
||||
return stream_blob_to_fd(1, oid, NULL, 0);
|
||||
return odb_stream_blob_to_fd(the_repository->objects, 1, oid, NULL, 0);
|
||||
}
|
||||
|
||||
if (!buf)
|
||||
|
||||
Reference in New Issue
Block a user