summaryrefslogtreecommitdiff
path: root/pkt-line.h
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2020-05-19 10:53:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-05-24 23:26:00 (GMT)
commit0181b600a6deb66a346dbcbe8300cf9e2467ebbb (patch)
tree505b09228bad56f93db3c56dc789dc9fe2747adb /pkt-line.h
parent74b082ad34fe2c727c676dac5c33d5e1e5f5ca56 (diff)
downloadgit-0181b600a6deb66a346dbcbe8300cf9e2467ebbb.zip
git-0181b600a6deb66a346dbcbe8300cf9e2467ebbb.tar.gz
git-0181b600a6deb66a346dbcbe8300cf9e2467ebbb.tar.bz2
pkt-line: define PACKET_READ_RESPONSE_END
In a future commit, we will use PACKET_READ_RESPONSE_END to separate messages proxied by remote-curl. To prepare for this, add the PACKET_READ_RESPONSE_END enum value. In switch statements that need a case added, die() or BUG() when a PACKET_READ_RESPONSE_END is unexpected. Otherwise, mirror how PACKET_READ_DELIM is implemented (especially in cases where packets are being forwarded). Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pkt-line.h')
-rw-r--r--pkt-line.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkt-line.h b/pkt-line.h
index a72af91..5b373fe 100644
--- a/pkt-line.h
+++ b/pkt-line.h
@@ -22,6 +22,7 @@
*/
void packet_flush(int fd);
void packet_delim(int fd);
+void packet_response_end(int fd);
void packet_write_fmt(int fd, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
void packet_buf_flush(struct strbuf *buf);
void packet_buf_delim(struct strbuf *buf);
@@ -94,6 +95,7 @@ enum packet_read_status {
PACKET_READ_NORMAL,
PACKET_READ_FLUSH,
PACKET_READ_DELIM,
+ PACKET_READ_RESPONSE_END,
};
enum packet_read_status packet_read_with_status(int fd, char **src_buffer,
size_t *src_len, char *buffer,