diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-07-17 06:56:36 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-07-16 22:16:16 -0700 |
| commit | e7e952f5c27bbca3d98bbcea6d20cd5b63d7d8e5 (patch) | |
| tree | 8a52ac4e02fa740f40c929cde207303b9342f088 /builtin/unpack-objects.c | |
| parent | odb: introduce `odb_write_object()` (diff) | |
| download | git-e7e952f5c27bbca3d98bbcea6d20cd5b63d7d8e5.tar.gz git-e7e952f5c27bbca3d98bbcea6d20cd5b63d7d8e5.zip | |
object-file: get rid of `the_repository` when writing objects
The logic that writes loose objects still relies on `the_repository` to
decide where exactly the object shall be written to. Refactor it so that
the logic instead operates on a `struct odb_source` so that we can get
rid of this global dependency.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/unpack-objects.c')
| -rw-r--r-- | builtin/unpack-objects.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index 1a4fbef36f..1d405d156e 100644 --- a/builtin/unpack-objects.c +++ b/builtin/unpack-objects.c @@ -403,7 +403,8 @@ static void stream_blob(unsigned long size, unsigned nr) data.zstream = &zstream; git_inflate_init(&zstream); - if (stream_loose_object(&in_stream, size, &info->oid)) + if (stream_loose_object(the_repository->objects->sources, + &in_stream, size, &info->oid)) die(_("failed to write object in stream")); if (data.status != Z_STREAM_END) |
