summaryrefslogtreecommitdiff
path: root/include/git2/odb.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-09-09 10:17:54 -0700
committerRussell Belfer <rb@github.com>2013-09-09 10:17:54 -0700
commit5fb1f9f2040df47ace275ab974b41d00883aef75 (patch)
treef1464b2553df04c9860bfb9404c41a74b4509c0f /include/git2/odb.h
parentef6389ad504037e7a4311adbf14f1fa5a5aa4190 (diff)
parent031f3f8028835c935d1e75ebd136aaaefffea821 (diff)
downloadlibgit2-5fb1f9f2040df47ace275ab974b41d00883aef75.tar.gz
Merge pull request #1837 from libgit2/ntk/topic/control_stream_write_size
odb: Error when streaming in less|more bytes than declared
Diffstat (limited to 'include/git2/odb.h')
-rw-r--r--include/git2/odb.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/git2/odb.h b/include/git2/odb.h
index 3e93a932c..e50a2a1c1 100644
--- a/include/git2/odb.h
+++ b/include/git2/odb.h
@@ -238,6 +238,9 @@ GIT_EXTERN(int) git_odb_open_wstream(git_odb_stream **out, git_odb *db, size_t s
/**
* Write to an odb stream
*
+ * This method will fail as soon as the total number of
+ * received bytes exceeds the size declared with `git_odb_open_wstream()`
+ *
* @param stream the stream
* @param buffer the data to write
* @param len the buffer's length
@@ -251,6 +254,9 @@ GIT_EXTERN(int) git_odb_stream_write(git_odb_stream *stream, const char *buffer,
* The object will take its final name and will be available to the
* odb.
*
+ * This method will fail if the total number of received bytes
+ * differs from the size declared with `git_odb_open_wstream()`
+ *
* @param out pointer to store the resulting object's id
* @param stream the stream
* @return 0 on success; an error code otherwise