From 8c2efa5d7671567975add8c4e493da65c968c376 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 15 Mar 2021 21:08:21 +0000 Subject: pkt-line: add options argument to read_packetized_to_strbuf() Update the calling sequence of `read_packetized_to_strbuf()` to take an options argument and not assume a fixed set of options. Update the only existing caller accordingly to explicitly pass the formerly-assumed flags. The `read_packetized_to_strbuf()` function calls `packet_read()` with a fixed set of assumed options (`PACKET_READ_GENTLE_ON_EOF`). This assumption has been fine for the single existing caller `apply_multi_file_filter()` in `convert.c`. In a later commit we would like to add other callers to `read_packetized_to_strbuf()` that need a different set of options. Signed-off-by: Johannes Schindelin Signed-off-by: Jeff Hostetler Signed-off-by: Junio C Hamano --- pkt-line.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkt-line.h') diff --git a/pkt-line.h b/pkt-line.h index 80ce0187e2..5af5f45687 100644 --- a/pkt-line.h +++ b/pkt-line.h @@ -136,7 +136,7 @@ char *packet_read_line_buf(char **src_buf, size_t *src_len, int *size); /* * Reads a stream of variable sized packets until a flush packet is detected. */ -ssize_t read_packetized_to_strbuf(int fd_in, struct strbuf *sb_out); +ssize_t read_packetized_to_strbuf(int fd_in, struct strbuf *sb_out, int options); /* * Receive multiplexed output stream over git native protocol. -- cgit v1.2.3