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

git-multi-pack-index.1 (7015B)


  1. '\" t
  2. .\" Title: git-multi-pack-index
  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 "GIT\-MULTI\-PACK\-INDEX" "1" "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. git-multi-pack-index \- Write and verify multi\-pack\-indexes
  32. .SH "SYNOPSIS"
  33. .sp
  34. .nf
  35. \fIgit multi\-pack\-index\fR [\-\-object\-dir=<dir>] [\-\-[no\-]bitmap] <sub\-command>
  36. .fi
  37. .SH "DESCRIPTION"
  38. .sp
  39. Write or verify a multi\-pack\-index (MIDX) file\&.
  40. .SH "OPTIONS"
  41. .PP
  42. \-\-object\-dir=<dir>
  43. .RS 4
  44. Use given directory for the location of Git objects\&. We check
  45. \fI<dir>\fR\fB/packs/multi\-pack\-index\fR
  46. for the current MIDX file, and
  47. \fI<dir>\fR\fB/packs\fR
  48. for the pack\-files to index\&.
  49. .sp
  50. \fI<dir>\fR
  51. must be an alternate of the current repository\&.
  52. .RE
  53. .PP
  54. \-\-[no\-]progress
  55. .RS 4
  56. Turn progress on/off explicitly\&. If neither is specified, progress is shown if standard error is connected to a terminal\&. Supported by sub\-commands
  57. \fBwrite\fR,
  58. \fBverify\fR,
  59. \fBexpire\fR, and `repack\&.
  60. .RE
  61. .sp
  62. The following subcommands are available:
  63. .PP
  64. write
  65. .RS 4
  66. Write a new MIDX file\&. The following options are available for the
  67. \fBwrite\fR
  68. sub\-command:
  69. .PP
  70. \-\-preferred\-pack=<pack>
  71. .RS 4
  72. Optionally specify the tie\-breaking pack used when multiple packs contain the same object\&.
  73. \fI<pack>\fR
  74. must contain at least one object\&. If not given, ties are broken in favor of the pack with the lowest mtime\&.
  75. .RE
  76. .PP
  77. \-\-[no\-]bitmap
  78. .RS 4
  79. Control whether or not a multi\-pack bitmap is written\&.
  80. .RE
  81. .PP
  82. \-\-stdin\-packs
  83. .RS 4
  84. Write a multi\-pack index containing only the set of line\-delimited pack index basenames provided over stdin\&.
  85. .RE
  86. .PP
  87. \-\-refs\-snapshot=<path>
  88. .RS 4
  89. With
  90. \fB\-\-bitmap\fR, optionally specify a file which contains a "refs snapshot" taken prior to repacking\&.
  91. .sp
  92. A reference snapshot is composed of line\-delimited OIDs corresponding to the reference tips, usually taken by
  93. \fBgit\fR
  94. \fBrepack\fR
  95. prior to generating a new pack\&. A line may optionally start with a
  96. \fB+\fR
  97. character to indicate that the reference which corresponds to that OID is "preferred" (see
  98. \fBgit-config\fR(1)\*(Aqs
  99. \fBpack\&.preferBitmapTips\fR\&.)
  100. .sp
  101. The file given at
  102. \fI<path>\fR
  103. is expected to be readable, and can contain duplicates\&. (If a given OID is given more than once, it is marked as preferred if at least one instance of it begins with the special
  104. \fB+\fR
  105. marker)\&.
  106. .RE
  107. .PP
  108. \-\-incremental
  109. .RS 4
  110. Write an incremental MIDX file containing only objects and packs not present in an existing MIDX layer\&. Migrates non\-incremental MIDXs to incremental ones when necessary\&. Incompatible with
  111. \fB\-\-bitmap\fR\&.
  112. .RE
  113. .RE
  114. .PP
  115. verify
  116. .RS 4
  117. Verify the contents of the MIDX file\&.
  118. .RE
  119. .PP
  120. expire
  121. .RS 4
  122. Delete the pack\-files that are tracked by the MIDX file, but have no objects referenced by the MIDX (with the exception of \&.\fBkeep\fR
  123. packs and cruft packs)\&. Rewrite the MIDX file afterward to remove all references to these pack\-files\&.
  124. .if n \{\
  125. .sp
  126. .\}
  127. .RS 4
  128. .it 1 an-trap
  129. .nr an-no-space-flag 1
  130. .nr an-break-flag 1
  131. .br
  132. .ps +1
  133. \fBNote\fR
  134. .ps -1
  135. .br
  136. this mode is incompatible with incremental MIDX files\&.
  137. .sp .5v
  138. .RE
  139. .RE
  140. .PP
  141. repack
  142. .RS 4
  143. Create a new pack\-file containing objects in small pack\-files referenced by the multi\-pack\-index\&. If the size given by the
  144. \fB\-\-batch\-size=\fR\fI<size>\fR
  145. argument is zero, then create a pack containing all objects referenced by the multi\-pack\-index\&. For a non\-zero batch size, Select the pack\-files by examining packs from oldest\-to\-newest, computing the "expected size" by counting the number of objects in the pack referenced by the multi\-pack\-index, then divide by the total number of objects in the pack and multiply by the pack size\&. We select packs with expected size below the batch size until the set of packs have total expected size at least the batch size, or all pack\-files are considered\&. If only one pack\-file is selected, then do nothing\&. If a new pack\-file is created, rewrite the multi\-pack\-index to reference the new pack\-file\&. A later run of
  146. \fIgit multi\-pack\-index expire\fR
  147. will delete the pack\-files that were part of this batch\&.
  148. .sp
  149. If
  150. \fBrepack\&.packKeptObjects\fR
  151. is
  152. \fBfalse\fR, then any pack\-files with an associated \&.\fBkeep\fR
  153. file will not be selected for the batch to repack\&.
  154. .if n \{\
  155. .sp
  156. .\}
  157. .RS 4
  158. .it 1 an-trap
  159. .nr an-no-space-flag 1
  160. .nr an-break-flag 1
  161. .br
  162. .ps +1
  163. \fBNote\fR
  164. .ps -1
  165. .br
  166. this mode is incompatible with incremental MIDX files\&.
  167. .sp .5v
  168. .RE
  169. .RE
  170. .SH "EXAMPLES"
  171. .sp
  172. .RS 4
  173. .ie n \{\
  174. \h'-04'\(bu\h'+03'\c
  175. .\}
  176. .el \{\
  177. .sp -1
  178. .IP \(bu 2.3
  179. .\}
  180. Write a MIDX file for the packfiles in the current \&.\fBgit\fR
  181. directory\&.
  182. .sp
  183. .if n \{\
  184. .RS 4
  185. .\}
  186. .nf
  187. $ git multi\-pack\-index write
  188. .fi
  189. .if n \{\
  190. .RE
  191. .\}
  192. .RE
  193. .sp
  194. .RS 4
  195. .ie n \{\
  196. \h'-04'\(bu\h'+03'\c
  197. .\}
  198. .el \{\
  199. .sp -1
  200. .IP \(bu 2.3
  201. .\}
  202. Write a MIDX file for the packfiles in the current \&.\fBgit\fR
  203. directory with a corresponding bitmap\&.
  204. .sp
  205. .if n \{\
  206. .RS 4
  207. .\}
  208. .nf
  209. $ git multi\-pack\-index write \-\-preferred\-pack=<pack> \-\-bitmap
  210. .fi
  211. .if n \{\
  212. .RE
  213. .\}
  214. .RE
  215. .sp
  216. .RS 4
  217. .ie n \{\
  218. \h'-04'\(bu\h'+03'\c
  219. .\}
  220. .el \{\
  221. .sp -1
  222. .IP \(bu 2.3
  223. .\}
  224. Write a MIDX file for the packfiles in an alternate object store\&.
  225. .sp
  226. .if n \{\
  227. .RS 4
  228. .\}
  229. .nf
  230. $ git multi\-pack\-index \-\-object\-dir <alt> write
  231. .fi
  232. .if n \{\
  233. .RE
  234. .\}
  235. .RE
  236. .sp
  237. .RS 4
  238. .ie n \{\
  239. \h'-04'\(bu\h'+03'\c
  240. .\}
  241. .el \{\
  242. .sp -1
  243. .IP \(bu 2.3
  244. .\}
  245. Verify the MIDX file for the packfiles in the current \&.\fBgit\fR
  246. directory\&.
  247. .sp
  248. .if n \{\
  249. .RS 4
  250. .\}
  251. .nf
  252. $ git multi\-pack\-index verify
  253. .fi
  254. .if n \{\
  255. .RE
  256. .\}
  257. .RE
  258. .SH "SEE ALSO"
  259. .sp
  260. See \m[blue]\fBThe Multi\-Pack\-Index Design Document\fR\m[]\&\s-2\u[1]\d\s+2 and \fBgitformat-pack\fR(5) for more information on the multi\-pack\-index feature and its file format\&.
  261. .SH "GIT"
  262. .sp
  263. Part of the \fBgit\fR(1) suite
  264. .SH "NOTES"
  265. .IP " 1." 4
  266. The Multi-Pack-Index Design Document
  267. .RS 4
  268. \%git-htmldocs/technical/multi-pack-index.html
  269. .RE