From 3f8290ea8552bb028c14e5be75315c2b90221802 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Wed, 5 Aug 2026 09:44:51 +0200 Subject: [PATCH] odb/streaming: rename `struct input_zstream_data` With the preceding refactorings the `struct input_zstream_data` is now somewhat misnamed, as it doesn't only contain the data anymore, but also the stream itself. Rename the structure to `struct zlib_stream` to better match the new structure. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- builtin/unpack-objects.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index 05a2d48011..3392a3b87d 100644 --- a/builtin/unpack-objects.c +++ b/builtin/unpack-objects.c @@ -358,16 +358,16 @@ static void unpack_non_delta_entry(enum object_type type, unsigned long size, write_object(nr, type, buf, size); } -struct input_zstream_data { +struct zlib_stream { struct odb_stream base; git_zstream *zstream; int status; }; -static ssize_t feed_input_zstream(struct odb_stream *in_stream, - char *buf, size_t buf_len) +static ssize_t zlib_stream_read(struct odb_stream *in_stream, + char *buf, size_t buf_len) { - struct input_zstream_data *data = container_of(in_stream, struct input_zstream_data, base); + struct zlib_stream *data = container_of(in_stream, struct zlib_stream, base); git_zstream *zstream = data->zstream; if (data->status != Z_OK) @@ -389,9 +389,9 @@ static ssize_t feed_input_zstream(struct odb_stream *in_stream, static void stream_blob(unsigned long size, unsigned nr) { git_zstream zstream = { 0 }; - struct input_zstream_data in_stream = { + struct zlib_stream in_stream = { .base = { - .read = feed_input_zstream, + .read = zlib_stream_read, .size = size, .type = OBJ_BLOB, },