From fa64a2fdbeedd98c5f24d1662bcc470a8449abcf Mon Sep 17 00:00:00 2001 From: Jonathan Tan Date: Wed, 26 Jul 2017 11:17:29 -0700 Subject: sub-process: refactor handshake to common function Refactor, into a common function, the version and capability negotiation done when invoking a long-running process as a clean or smudge filter. This will be useful for other Git code that needs to interact similarly with a long-running process. As you can see in the change to t0021, this commit changes the error message reported when the long-running process does not introduce itself with the expected "server"-terminated line. Originally, the error message reports that the filter "does not support filter protocol version 2", differentiating between the old single-file filter protocol and the new multi-file filter protocol - I have updated it to something more generic and useful. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- pkt-line.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'pkt-line.h') diff --git a/pkt-line.h b/pkt-line.h index 450183b649..66ef610fc4 100644 --- a/pkt-line.h +++ b/pkt-line.h @@ -25,8 +25,6 @@ void packet_buf_flush(struct strbuf *buf); void packet_buf_write(struct strbuf *buf, const char *fmt, ...) __attribute__((format (printf, 2, 3))); int packet_flush_gently(int fd); int packet_write_fmt_gently(int fd, const char *fmt, ...) __attribute__((format (printf, 2, 3))); -LAST_ARG_MUST_BE_NULL -int packet_writel(int fd, const char *line, ...); 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); -- cgit v1.2.3