summaryrefslogtreecommitdiff
path: root/include/git2/odb_backend.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-09-09 10:24:48 -0700
committerRussell Belfer <rb@github.com>2013-09-09 10:24:48 -0700
commit4dfe38205b7ddd255c87ff4656720072991fc432 (patch)
tree0c74fef4259d37568351fbf5fb80c9f6cf18e767 /include/git2/odb_backend.h
parent5fb1f9f2040df47ace275ab974b41d00883aef75 (diff)
downloadlibgit2-4dfe38205b7ddd255c87ff4656720072991fc432.tar.gz
Comment updates
Diffstat (limited to 'include/git2/odb_backend.h')
-rw-r--r--include/git2/odb_backend.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/git2/odb_backend.h b/include/git2/odb_backend.h
index e558bbb1c..87010f5eb 100644
--- a/include/git2/odb_backend.h
+++ b/include/git2/odb_backend.h
@@ -82,8 +82,7 @@ struct git_odb_stream {
size_t received_bytes;
/**
- * Write at most `len` bytes into `buffer` and advance the
- * stream.
+ * Write at most `len` bytes into `buffer` and advance the stream.
*/
int (*read)(git_odb_stream *stream, char *buffer, size_t len);
@@ -96,18 +95,19 @@ 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 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()`.
+ * This method might not be invoked if:
+ * - an error occurs earlier with the `write` callback,
+ * - the object referred to by `oid` already exists in any backend, or
+ * - the final number of received bytes differs from the size declared
+ * with `git_odb_open_wstream()`
*/
int (*finalize_write)(git_odb_stream *stream, const git_oid *oid);
/**
* Free the stream's memory.
+ *
+ * This method might be called without a call to `finalize_write` if
+ * an error occurs or if the object is already present in the ODB.
*/
void (*free)(git_odb_stream *stream);
};