diff options
author | Brandon Williams <bmwill@google.com> | 2018-03-14 11:31:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-14 14:15:06 -0700 |
commit | 77dabc14c497d2498b814967bf21a3ed1618207f (patch) | |
tree | cdf228f08b4093861cd8658f7691f23376e29d5f /reflog-walk.c | |
parent | pkt-line: introduce packet_read_with_status (diff) | |
download | tgif-77dabc14c497d2498b814967bf21a3ed1618207f.tar.xz |
pkt-line: allow peeking a packet line without consuming it
Sometimes it is advantageous to be able to peek the next packet line
without consuming it (e.g. to be able to determine the protocol version
a server is speaking). In order to do that introduce 'struct
packet_reader' which is an abstraction around the normal packet reading
logic. This enables a caller to be able to peek a single line at a time
using 'packet_reader_peek()' and having a caller consume a line by
calling 'packet_reader_read()'.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reflog-walk.c')
0 files changed, 0 insertions, 0 deletions