Subject: Re: [PATCH v2 17/19] streaming: refactor interface to be object-database-centric

From: Junio C Hamano <[email-masked]>
Date: Fri, 21 Nov 2025 16:10:18 -0800

Patrick Steinhardt <[email-masked]> writes:

> Refactor the streaming interface to be centered around object databases
> instead of centered around the repository. Rename the functions
> accordingly.

Good idea.  

> -	st = open_istream(r, oid, &type, &sz, NULL);
> +	st = odb_read_object_stream(r->objects, oid, &type, &sz, NULL);

Calling the thing that is returned a "read stream" is a lot more
trivially obvious than the original name "i(nput) stream", and I
like that aspect of the new name a lot better, and the structure is
also named appropriately ("struct odb_read_stream").

At least the old naming was consistent with the usual file I/O API.
you "open" istream, then "read" from that istream, and finally
"close" that istream.  If you insist on having the noun first before
the verb, call them

    odb_read_stream_open()
    odb_read_stream_read()
    odb_read_stream_close()

perhaps?  I think _read and _close are already named appropriately.