Browse Source
Most pkt-lines (data-pkts) have the form pkt-len pkt-payload where pkt-len is a string of 4 hexadecimal digits representing the size in bytes of the pkt-line. Since this size includes the size of the pkt-len, no data-pkt has a length less than 4. A pkt-line with a length field less than 4 can thus be used for other purposes. In Git protocol v1, the only such pkt-line was flush-pkt = "0000" which was used to mark the end of a stream. Protocol v2 (see Documentation/technical/protocol-v2.txt in git.git) introduces a second special pkt-line type: delim-pkt = "0001" used to mark the end of a section within a stream, for example to separate capabilities from the content of a command. [jn: split out from a larger patch that made use of this support] Change-Id: I10e7824fa24ed74c4f45624bd490bba978cf5c34 Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>stable-5.0
Jonathan Tan
7 years ago
committed by
Jonathan Nieder
4 changed files with 41 additions and 11 deletions
Loading…
Reference in new issue