path: root/pkt-line.c
diff options
authorJohannes Schindelin <>2021-03-15 21:08:21 (GMT)
committerJunio C Hamano <>2021-03-15 21:32:50 (GMT)
commit8c2efa5d7671567975add8c4e493da65c968c376 (patch)
treee6c9ad34bf87f7bc7d05518b2232434863ca81ec /pkt-line.c
parentc4ba57939745641a3c7622096fddfc77cecf0d39 (diff)
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 <>
Diffstat (limited to 'pkt-line.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/pkt-line.c b/pkt-line.c
index 457ac4e..0194137 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -444,7 +444,7 @@ char *packet_read_line_buf(char **src, size_t *src_len, int *dst_len)
return packet_read_line_generic(-1, src, src_len, dst_len);
-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)
int packet_len;
@@ -460,7 +460,7 @@ ssize_t read_packetized_to_strbuf(int fd_in, struct strbuf *sb_out)
* that there is already room for the extra byte.
sb_out->buf + sb_out->len, LARGE_PACKET_DATA_MAX+1,
+ options);
if (packet_len <= 0)
sb_out->len += packet_len;