summaryrefslogtreecommitdiff
path: root/pkt-line.h
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-03-15 17:31:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-15 19:01:09 (GMT)
commitf1f4d8acf400912a9e2a7b97080afced56719c29 (patch)
treee4db72587bbab47709c0c4c49c80e5bd7e05186c /pkt-line.h
parentedc9caf7e2ecd3d5327e78a3e539eda61a0e4d81 (diff)
downloadgit-f1f4d8acf400912a9e2a7b97080afced56719c29.zip
git-f1f4d8acf400912a9e2a7b97080afced56719c29.tar.gz
git-f1f4d8acf400912a9e2a7b97080afced56719c29.tar.bz2
pkt-line: add packet_buf_write_len function
Add the 'packet_buf_write_len()' function which allows for writing an arbitrary length buffer into a 'struct strbuf' and formatting it in packet-line format. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pkt-line.h')
-rw-r--r--pkt-line.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkt-line.h b/pkt-line.h
index 9570bd7..5b28d43 100644
--- a/pkt-line.h
+++ b/pkt-line.h
@@ -26,6 +26,7 @@ void packet_buf_flush(struct strbuf *buf);
void packet_buf_delim(struct strbuf *buf);
void packet_write(int fd_out, const char *buf, size_t size);
void packet_buf_write(struct strbuf *buf, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
+void packet_buf_write_len(struct strbuf *buf, const char *data, size_t len);
int packet_flush_gently(int fd);
int packet_write_fmt_gently(int fd, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
int write_packetized_from_fd(int fd_in, int fd_out);