diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2018-02-08 22:51:46 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-08 22:51:46 +0000 |
| commit | 0fd0bfe435989b4947babfcd61b0bf573ff41e28 (patch) | |
| tree | 51c7d216d514f56c55dc46b7bd2e808a7dc84d2e /include | |
| parent | d749822c58400be8212215fa0013cc8b76c7a1d3 (diff) | |
| parent | 09df354e03b6856ba713ee36a89186ea7b52a123 (diff) | |
| download | libgit2-0fd0bfe435989b4947babfcd61b0bf573ff41e28.tar.gz | |
Merge pull request #4450 from libgit2/ethomson/odb_loose_readstream
Streaming read support for the loose ODB backend
Diffstat (limited to 'include')
| -rw-r--r-- | include/git2/odb.h | 9 | ||||
| -rw-r--r-- | include/git2/sys/odb_backend.h | 3 |
2 files changed, 10 insertions, 2 deletions
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. diff --git a/include/git2/sys/odb_backend.h b/include/git2/sys/odb_backend.h index 9bcc50ddd..792f103fe 100644 --- a/include/git2/sys/odb_backend.h +++ b/include/git2/sys/odb_backend.h @@ -56,7 +56,8 @@ struct git_odb_backend { git_odb_stream **, git_odb_backend *, git_off_t, git_otype); int (* readstream)( - git_odb_stream **, git_odb_backend *, const git_oid *); + git_odb_stream **, size_t *, git_otype *, + git_odb_backend *, const git_oid *); int (* exists)( git_odb_backend *, const git_oid *); |
