NAME
gitprotocol-common - Things common to various protocolsSYNOPSIS
<over-the-wire-protocol>
DESCRIPTION
This document sets defines things common to various over-the-wire protocols and file formats used in Git.ABNF NOTATION
ABNF notation as described by RFC 5234 is used within the protocol documents, except the following replacement core rules are used:HEXDIG = DIGIT / "a" / "b" / "c" / "d" / "e" / "f"
NUL = %x00 zero-id = 40*"0" obj-id = 40*(HEXDIGIT) refname = "HEAD" refname /= "refs/" <see discussion below>
1.They can include slash / for
hierarchical (directory) grouping, but no slash-separated component can begin
with a dot ..
2.They must contain at least one /.
This enforces the presence of a category like heads/, tags/ etc.
but the actual names are not restricted.
3.They cannot have two consecutive dots
.. anywhere.
4.They cannot have ASCII control characters
(i.e. bytes whose values are lower than \040, or \177 DEL), space,
tilde ~, caret ^, colon :, question-mark ?,
asterisk *, or open bracket [ anywhere.
5.They cannot end with a slash / or a
dot ..
6.They cannot end with the sequence
.lock.
7.They cannot contain a sequence
@{.
8.They cannot contain a \\.
PKT-LINE FORMAT
Much (but not all) of the payload is described around pkt-lines.pkt-line = data-pkt / flush-pkt data-pkt = pkt-len pkt-payload pkt-len = 4*(HEXDIG) pkt-payload = (pkt-len - 4)*(OCTET) flush-pkt = "0000"
pkt-line actual value --------------------------------- "0006a\n" "a\n" "0005a" "a" "000bfoobar\n" "foobar\n" "0004" ""
GIT
Part of the git(1) suite02/28/2023 | Git 2.39.2 |