Module protocol

Module protocol 

Source
Expand description

Git protocol implementation (pkt-line format)

Git uses “pkt-line” framing: 4 hex digits length prefix followed by data. Special values: “0000” (flush), “0001” (delimiter), “0002” (response-end)

Modules§

sideband
Side-band channel IDs

Structs§

PktLineReader
Parse pkt-lines from a buffer
PktLineWriter
Build pkt-line responses

Enums§

PktLine
A pkt-line entry

Constants§

DELIM_PKT
Delimiter packet (separates sections)
FLUSH_PKT
Flush packet (marks end of message)
MAX_PKT_LINE
Maximum pkt-line data size (65516 bytes payload + 4 length + 1 newline)
RECEIVE_PACK_CAPABILITIES
Server capabilities for receive-pack
RESPONSE_END_PKT
Response end packet
UPLOAD_PACK_CAPABILITIES
Server capabilities for upload-pack

Functions§

format_capabilities
Format capabilities as string
parse_capabilities
Parse capability string from ref advertisement
pkt_line
Write a pkt-line
pkt_line_with_newline
Write a pkt-line with newline suffix
sideband_pkt
Write data to a side-band channel