gitformat-bundle
(5)The bundle file format
DESCRIPTION
FORMAT
We will use ABNF notation to define the Git bundle format. See gitprotocol-common(5) for the details.
A v2 bundle looks like this:
bundle = signature *prerequisite *reference LF pack signature = "# v2 git bundle" LF prerequisite = "-" obj-id SP comment LF comment = *CHAR reference = obj-id SP refname LF pack = ... ; packfile
A v3 bundle looks like this:
bundle = signature *capability *prerequisite *reference LF pack signature = "# v3 git bundle" LF capability = "@" key ["=" value] LF prerequisite = "-" obj-id SP comment LF comment = *CHAR reference = obj-id SP refname LF key = 1*(ALPHA / DIGIT / "-") value = *(%01-09 / %0b-FF) pack = ... ; packfile
SEMANTICS
A Git bundle consists of several parts.
In the bundle format, there can be a comment following a prerequisite obj-id. This is a comment and it has no specific meaning. The writer of the bundle MAY put any string here. The reader of the bundle MUST ignore the comment.
Note on shallow clones and Git bundles
Note that the prerequisites do not represent a shallow-clone boundary. The semantics of the prerequisites and the shallow-clone boundaries are different, and the Git bundle v2 format cannot represent a shallow clone repository.
CAPABILITIES
Because there is no opportunity for negotiation, unknown capabilities cause git bundle to abort.