diff options
author | Pierre Habouzit <madcoder@debian.org> | 2007-09-27 15:25:55 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-29 21:26:10 -0700 |
commit | 387e7e19d7eb5444be8da8e99ed7491989dc1cbb (patch) | |
tree | b1fcd32479e6d22abc0e2060e70ea7846fa2b273 /strbuf.h | |
parent | b315c5c08139c0d3c1e4867a305334e29da01d07 (diff) | |
download | git-387e7e19d7eb5444be8da8e99ed7491989dc1cbb.tar.gz |
strbuf_read_file enhancement, and use it.
* make strbuf_read_file take a size hint (works like strbuf_read)
* use it in a couple of places.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'strbuf.h')
-rw-r--r-- | strbuf.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -108,7 +108,7 @@ extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...); extern size_t strbuf_fread(struct strbuf *, size_t, FILE *); /* XXX: if read fails, any partial read is undone */ extern ssize_t strbuf_read(struct strbuf *, int fd, size_t hint); -extern int strbuf_read_file(struct strbuf *sb, const char *path); +extern int strbuf_read_file(struct strbuf *sb, const char *path, size_t hint); extern int strbuf_getline(struct strbuf *, FILE *, int); |