summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-07-06 13:06:45 -0700
committerJunio C Hamano <gitster@pobox.com>2016-07-06 13:06:45 -0700
commitf7927316cf7b6252e27e54cdd2929039253c2422 (patch)
tree943aebcab6d25dc2567fa0241afb8dd2646e1b20
parent1c22105f2ce6795035f4d030325127dab9736caa (diff)
parented008d7bb957ccfbe32c95aad74ee78e0e31de16 (diff)
downloadgit-f7927316cf7b6252e27e54cdd2929039253c2422.tar.gz
Merge branch 'pb/strbuf-read-file-doc' into maint
Minor doc update. * pb/strbuf-read-file-doc: strbuf: describe the return value of strbuf_read_file
-rw-r--r--strbuf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/strbuf.h b/strbuf.h
index 7987405313..83c5c98530 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -377,6 +377,8 @@ extern ssize_t strbuf_read_once(struct strbuf *, int fd, size_t hint);
/**
* Read the contents of a file, specified by its path. The third argument
* can be used to give a hint about the file size, to avoid reallocs.
+ * Return the number of bytes read or a negative value if some error
+ * occurred while opening or reading the file.
*/
extern ssize_t strbuf_read_file(struct strbuf *sb, const char *path, size_t hint);