[PATCH v2 7/8] odb/streaming: rename `struct input_zstream_data`

Patrick Steinhardt <[email protected]> Wed, 05 Aug 2026 09:44:51 +0200
Newsgroups org.kernel.vger.git
Message-ID <[email protected]>
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 <[email protected]>
---
 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,
 		},

-- 
2.55.0.679.g6767b8d81c.dirty