logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

gitformat-bundle.5 (5069B)


  1. '\" t
  2. .\" Title: gitformat-bundle
  3. .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
  5. .\" Date: 2025-03-14
  6. .\" Manual: Git Manual
  7. .\" Source: Git 2.49.0
  8. .\" Language: English
  9. .\"
  10. .TH "GITFORMAT\-BUNDLE" "5" "2025-03-14" "Git 2\&.49\&.0" "Git Manual"
  11. .\" -----------------------------------------------------------------
  12. .\" * Define some portability stuff
  13. .\" -----------------------------------------------------------------
  14. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. .\" http://bugs.debian.org/507673
  16. .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  17. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH "NAME"
  31. gitformat-bundle \- The bundle file format
  32. .SH "SYNOPSIS"
  33. .sp
  34. .nf
  35. *\&.bundle
  36. *\&.bdl
  37. .fi
  38. .SH "DESCRIPTION"
  39. .sp
  40. The Git bundle format is a format that represents both refs and Git objects\&. A bundle is a header in a format similar to \fBgit-show-ref\fR(1) followed by a pack in *\&.pack format\&.
  41. .sp
  42. The format is created and read by the \fBgit-bundle\fR(1) command, and supported by e\&.g\&. \fBgit-fetch\fR(1) and \fBgit-clone\fR(1)\&.
  43. .SH "FORMAT"
  44. .sp
  45. We will use ABNF notation to define the Git bundle format\&. See \fBgitprotocol-common\fR(5) for the details\&.
  46. .sp
  47. A v2 bundle looks like this:
  48. .sp
  49. .if n \{\
  50. .RS 4
  51. .\}
  52. .nf
  53. bundle = signature *prerequisite *reference LF pack
  54. signature = "# v2 git bundle" LF
  55. prerequisite = "\-" obj\-id SP comment LF
  56. comment = *CHAR
  57. reference = obj\-id SP refname LF
  58. pack = \&.\&.\&. ; packfile
  59. .fi
  60. .if n \{\
  61. .RE
  62. .\}
  63. .sp
  64. A v3 bundle looks like this:
  65. .sp
  66. .if n \{\
  67. .RS 4
  68. .\}
  69. .nf
  70. bundle = signature *capability *prerequisite *reference LF pack
  71. signature = "# v3 git bundle" LF
  72. capability = "@" key ["=" value] LF
  73. prerequisite = "\-" obj\-id SP comment LF
  74. comment = *CHAR
  75. reference = obj\-id SP refname LF
  76. key = 1*(ALPHA / DIGIT / "\-")
  77. value = *(%01\-09 / %0b\-FF)
  78. pack = \&.\&.\&. ; packfile
  79. .fi
  80. .if n \{\
  81. .RE
  82. .\}
  83. .SH "SEMANTICS"
  84. .sp
  85. A Git bundle consists of several parts\&.
  86. .sp
  87. .RS 4
  88. .ie n \{\
  89. \h'-04'\(bu\h'+03'\c
  90. .\}
  91. .el \{\
  92. .sp -1
  93. .IP \(bu 2.3
  94. .\}
  95. "Capabilities", which are only in the v3 format, indicate functionality that the bundle requires to be read properly\&.
  96. .RE
  97. .sp
  98. .RS 4
  99. .ie n \{\
  100. \h'-04'\(bu\h'+03'\c
  101. .\}
  102. .el \{\
  103. .sp -1
  104. .IP \(bu 2.3
  105. .\}
  106. "Prerequisites" list the objects that are NOT included in the bundle and the reader of the bundle MUST already have, in order to use the data in the bundle\&. The objects stored in the bundle may refer to prerequisite objects and anything reachable from them (e\&.g\&. a tree object in the bundle can reference a blob that is reachable from a prerequisite) and/or expressed as a delta against prerequisite objects\&.
  107. .RE
  108. .sp
  109. .RS 4
  110. .ie n \{\
  111. \h'-04'\(bu\h'+03'\c
  112. .\}
  113. .el \{\
  114. .sp -1
  115. .IP \(bu 2.3
  116. .\}
  117. "References" record the tips of the history graph, iow, what the reader of the bundle CAN "git fetch" from it\&.
  118. .RE
  119. .sp
  120. .RS 4
  121. .ie n \{\
  122. \h'-04'\(bu\h'+03'\c
  123. .\}
  124. .el \{\
  125. .sp -1
  126. .IP \(bu 2.3
  127. .\}
  128. "Pack" is the pack data stream "git fetch" would send, if you fetch from a repository that has the references recorded in the "References" above into a repository that has references pointing at the objects listed in "Prerequisites" above\&.
  129. .RE
  130. .sp
  131. 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\&.
  132. .SS "Note on shallow clones and Git bundles"
  133. .sp
  134. 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\&.
  135. .SH "CAPABILITIES"
  136. .sp
  137. Because there is no opportunity for negotiation, unknown capabilities cause \fIgit bundle\fR to abort\&.
  138. .sp
  139. .RS 4
  140. .ie n \{\
  141. \h'-04'\(bu\h'+03'\c
  142. .\}
  143. .el \{\
  144. .sp -1
  145. .IP \(bu 2.3
  146. .\}
  147. \fBobject\-format\fR
  148. specifies the hash algorithm in use, and can take the same values as the
  149. \fBextensions\&.objectFormat\fR
  150. configuration value\&.
  151. .RE
  152. .sp
  153. .RS 4
  154. .ie n \{\
  155. \h'-04'\(bu\h'+03'\c
  156. .\}
  157. .el \{\
  158. .sp -1
  159. .IP \(bu 2.3
  160. .\}
  161. \fBfilter\fR
  162. specifies an object filter as in the
  163. \fB\-\-filter\fR
  164. option in
  165. \fBgit-rev-list\fR(1)\&. The resulting pack\-file must be marked as a \&.\fBpromisor\fR
  166. pack\-file after it is unbundled\&.
  167. .RE
  168. .SH "GIT"
  169. .sp
  170. Part of the \fBgit\fR(1) suite