From 97f9a5f0bca920e2ce260b17fa7cea0a2c0991ca Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Sun, 17 Dec 2017 01:12:49 +0000 Subject: odb: provide length and type with streaming read The streaming read functionality should provide the length and the type of the object, like the normal read functionality does. --- include/git2/odb.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/git2/odb.h') diff --git a/include/git2/odb.h b/include/git2/odb.h index b7dc0c5f3..006a75b7a 100644 --- a/include/git2/odb.h +++ b/include/git2/odb.h @@ -357,11 +357,18 @@ GIT_EXTERN(void) git_odb_stream_free(git_odb_stream *stream); * @see git_odb_stream * * @param out pointer where to store the stream + * @param len pointer where to store the length of the object + * @param type pointer where to store the type of the object * @param db object database where the stream will read from * @param oid oid of the object the stream will read from * @return 0 if the stream was created; error code otherwise */ -GIT_EXTERN(int) git_odb_open_rstream(git_odb_stream **out, git_odb *db, const git_oid *oid); +GIT_EXTERN(int) git_odb_open_rstream( + git_odb_stream **out, + size_t *len, + git_otype *type, + git_odb *db, + const git_oid *oid); /** * Open a stream for writing a pack file to the ODB. -- cgit v1.2.1