Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
git submodule update: have a dedicated helper for cloning
[gitweb.git]
/
strbuf.c
diff --git
a/strbuf.c
b/strbuf.c
index 38686ffb65c2de953f9b224a5eecd22188081417..5f6da82e7e57481f4aba41fdcb5978593a92a10a 100644
(file)
--- a/
strbuf.c
+++ b/
strbuf.c
@@
-395,6
+395,12
@@
ssize_t strbuf_read_once(struct strbuf *sb, int fd, size_t hint)
return cnt;
}
+ssize_t strbuf_write(struct strbuf *sb, FILE *f)
+{
+ return sb->len ? fwrite(sb->buf, 1, sb->len, f) : 0;
+}
+
+
#define STRBUF_MAXLINK (2*PATH_MAX)
int strbuf_readlink(struct strbuf *sb, const char *path, size_t hint)