summaryrefslogtreecommitdiff
path: root/pkt-line.h
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2021-03-15 21:08:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-15 21:32:50 (GMT)
commit3a63c6a48c0588a237b3133fe785d6e734dedbb5 (patch)
tree34a9c24d2755dcad66d779f4b792e8f021203c6b /pkt-line.h
parent7455e05e4e750451eb3c33359a2bc9050156750c (diff)
downloadgit-3a63c6a48c0588a237b3133fe785d6e734dedbb5.zip
git-3a63c6a48c0588a237b3133fe785d6e734dedbb5.tar.gz
git-3a63c6a48c0588a237b3133fe785d6e734dedbb5.tar.bz2
pkt-line: do not issue flush packets in write_packetized_*()
Remove the `packet_flush_gently()` call in `write_packetized_from_buf() and `write_packetized_from_fd()` and require the caller to call it if desired. Rename both functions to `write_packetized_from_*_no_flush()` to prevent later merge accidents. `write_packetized_from_buf()` currently only has one caller: `apply_multi_file_filter()` in `convert.c`. It always wants a flush packet to be written after writing the payload. However, we are about to introduce a caller that wants to write many packets before a final flush packet, so let's make the caller responsible for emitting the flush packet. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pkt-line.h')
-rw-r--r--pkt-line.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkt-line.h b/pkt-line.h
index 8c90daa..31012b9 100644
--- a/pkt-line.h
+++ b/pkt-line.h
@@ -32,8 +32,8 @@ void packet_buf_write(struct strbuf *buf, const char *fmt, ...) __attribute__((f
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);
-int write_packetized_from_buf(const char *src_in, size_t len, int fd_out);
+int write_packetized_from_fd_no_flush(int fd_in, int fd_out);
+int write_packetized_from_buf_no_flush(const char *src_in, size_t len, int fd_out);
/*
* Read a packetized line into the buffer, which must be at least size bytes