diff options
Diffstat (limited to 'include/git2/odb_backend.h')
| -rw-r--r-- | include/git2/odb_backend.h | 13 | 
1 files changed, 10 insertions, 3 deletions
diff --git a/include/git2/odb_backend.h b/include/git2/odb_backend.h index bafeec047..e558bbb1c 100644 --- a/include/git2/odb_backend.h +++ b/include/git2/odb_backend.h @@ -78,6 +78,9 @@ struct git_odb_stream {  	unsigned int mode;  	void *hash_ctx; +	size_t declared_size; +	size_t received_bytes; +  	/**  	 * Write at most `len` bytes into `buffer` and advance the  	 * stream. @@ -93,9 +96,13 @@ struct git_odb_stream {  	 * Store the contents of the stream as an object with the id  	 * specified in `oid`.  	 * -	 * This method will *not* be invoked by libgit2 if the object pointed at -	 * by `oid` already exists in any backend. Libgit2 will however take care -	 * of properly disposing the stream through a call to `free()`. +	 * This method will *not* be invoked by libgit2 when: +	 *  - the object pointed at by `oid` already exists in any backend. +	 * 	- the total number of received bytes differs from the size declared +	 *    with `git_odb_open_wstream()` +	 * +	 * Libgit2 will however take care of properly disposing the stream through +	 * a call to `free()`.  	 */  	int (*finalize_write)(git_odb_stream *stream, const git_oid *oid);  | 
