summaryrefslogtreecommitdiff
path: root/strbuf.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-06-27 16:56:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-06-27 16:56:46 (GMT)
commited319fca3380bd4d68d316f92c5aa777dc785f85 (patch)
treec1fcbdcb4d02916fc68f4e25d830ffb52c919914 /strbuf.h
parent3a764599229e8263479c537072941f6377531cc1 (diff)
parented008d7bb957ccfbe32c95aad74ee78e0e31de16 (diff)
downloadgit-ed319fca3380bd4d68d316f92c5aa777dc785f85.zip
git-ed319fca3380bd4d68d316f92c5aa777dc785f85.tar.gz
git-ed319fca3380bd4d68d316f92c5aa777dc785f85.tar.bz2
Merge branch 'pb/strbuf-read-file-doc'
* pb/strbuf-read-file-doc: strbuf: describe the return value of strbuf_read_file
Diffstat (limited to 'strbuf.h')
-rw-r--r--strbuf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/strbuf.h b/strbuf.h
index 7987405..83c5c98 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);