diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-01-14 22:16:04 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-14 22:16:04 +0300 |
commit | 17069c7fae20f5e3082ee639066a37de5af6030e (patch) | |
tree | 52b612da693386eae08a4d87540c15744d468b13 /pkt-line.h | |
parent | ecbdaf0899161c067986e9d9d564586d4b045d62 (diff) | |
parent | 2d103c31c2cfcf03ff1408d639043469b0c93f70 (diff) |
Merge branch 'ms/packet-err-check' into jt/fetch-v2-sideband
* ms/packet-err-check:
pack-protocol.txt: accept error packets in any context
Use packet_reader instead of packet_read_line
Diffstat (limited to 'pkt-line.h')
-rw-r--r-- | pkt-line.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkt-line.h b/pkt-line.h index 5b28d43472..d7e1dbc047 100644 --- a/pkt-line.h +++ b/pkt-line.h @@ -62,9 +62,13 @@ int write_packetized_from_buf(const char *src_in, size_t len, int fd_out); * * If options contains PACKET_READ_CHOMP_NEWLINE, a trailing newline (if * present) is removed from the buffer before returning. + * + * If options contains PACKET_READ_DIE_ON_ERR_PACKET, it dies when it sees an + * ERR packet. */ -#define PACKET_READ_GENTLE_ON_EOF (1u<<0) -#define PACKET_READ_CHOMP_NEWLINE (1u<<1) +#define PACKET_READ_GENTLE_ON_EOF (1u<<0) +#define PACKET_READ_CHOMP_NEWLINE (1u<<1) +#define PACKET_READ_DIE_ON_ERR_PACKET (1u<<2) int packet_read(int fd, char **src_buffer, size_t *src_len, char *buffer, unsigned size, int options); |