git submodule update: have a dedicated helper for cloning
[gitweb.git] / strbuf.h
index 2bf90e70fcf1e9bcbfcbfdf4bc8b30e1d7b61d10..d4f2aa1365d52e80d5601f8c298024bd82a95fa7 100644 (file)
--- a/strbuf.h
+++ b/strbuf.h
@@ -386,6 +386,12 @@ extern ssize_t strbuf_read_file(struct strbuf *sb, const char *path, size_t hint
  */
 extern int strbuf_readlink(struct strbuf *sb, const char *path, size_t hint);
 
+/**
+ * Write the whole content of the strbuf to the stream not stopping at
+ * NUL bytes.
+ */
+extern ssize_t strbuf_write(struct strbuf *sb, FILE *stream);
+
 /**
  * Read a line from a FILE *, overwriting the existing contents
  * of the strbuf. The second argument specifies the line