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-index-pack.1 (8610B)


  1. '\" t
  2. .\" Title: git-index-pack
  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\-INDEX\-PACK" "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-index-pack \- Build pack index file for an existing packed archive
  32. .SH "SYNOPSIS"
  33. .sp
  34. .nf
  35. \fIgit index\-pack\fR [\-v] [\-o <index\-file>] [\-\-[no\-]rev\-index] <pack\-file>
  36. \fIgit index\-pack\fR \-\-stdin [\-\-fix\-thin] [\-\-keep] [\-v] [\-o <index\-file>]
  37. [\-\-[no\-]rev\-index] [<pack\-file>]
  38. .fi
  39. .SH "DESCRIPTION"
  40. .sp
  41. Reads a packed archive (\&.pack) from the specified file, builds a pack index file (\&.idx) for it, and optionally writes a reverse\-index (\&.rev) for the specified pack\&. The packed archive, together with the pack index, can then be placed in the objects/pack/ directory of a Git repository\&.
  42. .SH "OPTIONS"
  43. .PP
  44. \-v
  45. .RS 4
  46. Be verbose about what is going on, including progress status\&.
  47. .RE
  48. .PP
  49. \-o <index\-file>
  50. .RS 4
  51. Write the generated pack index into the specified file\&. Without this option the name of pack index file is constructed from the name of packed archive file by replacing \&.pack with \&.idx (and the program fails if the name of packed archive does not end with \&.pack)\&.
  52. .RE
  53. .PP
  54. \-\-[no\-]rev\-index
  55. .RS 4
  56. When this flag is provided, generate a reverse index (a \&.\fBrev\fR
  57. file) corresponding to the given pack\&. If
  58. \fB\-\-verify\fR
  59. is given, ensure that the existing reverse index is correct\&. Takes precedence over
  60. \fBpack\&.writeReverseIndex\fR\&.
  61. .RE
  62. .PP
  63. \-\-stdin
  64. .RS 4
  65. When this flag is provided, the pack is read from stdin instead and a copy is then written to <pack\-file>\&. If <pack\-file> is not specified, the pack is written to objects/pack/ directory of the current Git repository with a default name determined from the pack content\&. If <pack\-file> is not specified consider using \-\-keep to prevent a race condition between this process and
  66. \fIgit repack\fR\&.
  67. .RE
  68. .PP
  69. \-\-fix\-thin
  70. .RS 4
  71. Fix a "thin" pack produced by
  72. \fBgit\fR
  73. \fBpack\-objects\fR
  74. \fB\-\-thin\fR
  75. (see
  76. \fBgit-pack-objects\fR(1)
  77. for details) by adding the excluded objects the deltified objects are based on to the pack\&. This option only makes sense in conjunction with \-\-stdin\&.
  78. .RE
  79. .PP
  80. \-\-keep
  81. .RS 4
  82. Before moving the index into its final destination create an empty \&.keep file for the associated pack file\&. This option is usually necessary with \-\-stdin to prevent a simultaneous
  83. \fIgit repack\fR
  84. process from deleting the newly constructed pack and index before refs can be updated to use objects contained in the pack\&.
  85. .RE
  86. .PP
  87. \-\-keep=<msg>
  88. .RS 4
  89. Like \-\-keep, create a \&.keep file before moving the index into its final destination\&. However, instead of creating an empty file place
  90. \fI<msg>\fR
  91. followed by an LF into the \&.keep file\&. The
  92. \fI<msg>\fR
  93. message can later be searched for within all \&.keep files to locate any which have outlived their usefulness\&.
  94. .RE
  95. .PP
  96. \-\-index\-version=<version>[,<offset>]
  97. .RS 4
  98. This is intended to be used by the test suite only\&. It allows to force the version for the generated pack index, and to force 64\-bit index entries on objects located above the given offset\&.
  99. .RE
  100. .PP
  101. \-\-strict[=<msg\-id>=<severity>\&...\:]
  102. .RS 4
  103. Die, if the pack contains broken objects or links\&. An optional comma\-separated list of
  104. \fI<msg\-id>\fR\fB=\fR\fI<severity>\fR
  105. can be passed to change the severity of some possible issues, e\&.g\&.,
  106. \fB\-\-strict=\fR"missingEmail=ignore,badTagName=error"\&. See the entry for the
  107. \fBfsck\&.\fR\fI<msg\-id>\fR
  108. configuration options in
  109. \fBgit-fsck\fR(1)
  110. for more information on the possible values of
  111. \fI<msg\-id>\fR
  112. and
  113. \fI<severity>\fR\&.
  114. .RE
  115. .PP
  116. \-\-progress\-title
  117. .RS 4
  118. For internal use only\&.
  119. .sp
  120. Set the title of the progress bar\&. The title is "Receiving objects" by default and "Indexing objects" when
  121. \fB\-\-stdin\fR
  122. is specified\&.
  123. .RE
  124. .PP
  125. \-\-check\-self\-contained\-and\-connected
  126. .RS 4
  127. Die if the pack contains broken links\&. For internal use only\&.
  128. .RE
  129. .PP
  130. \-\-fsck\-objects[=<msg\-id>=<severity>\&...\:]
  131. .RS 4
  132. Die if the pack contains broken objects, but unlike
  133. \fB\-\-strict\fR, don\(cqt choke on broken links\&. If the pack contains a tree pointing to a \&.gitmodules blob that does not exist, prints the hash of that blob (for the caller to check) after the hash that goes into the name of the pack/idx file (see "Notes")\&.
  134. .sp
  135. An optional comma\-separated list of
  136. \fI<msg\-id>\fR\fB=\fR\fI<severity>\fR
  137. can be passed to change the severity of some possible issues, e\&.g\&.,
  138. \fB\-\-fsck\-objects=\fR"missingEmail=ignore,badTagName=ignore"\&. See the entry for the
  139. \fBfsck\&.\fR\fI<msg\-id>\fR
  140. configuration options in
  141. \fBgit-fsck\fR(1)
  142. for more information on the possible values of
  143. \fI<msg\-id>\fR
  144. and
  145. \fI<severity>\fR\&.
  146. .RE
  147. .PP
  148. \-\-threads=<n>
  149. .RS 4
  150. Specifies the number of threads to spawn when resolving deltas\&. This requires that index\-pack be compiled with pthreads otherwise this option is ignored with a warning\&. This is meant to reduce packing time on multiprocessor machines\&. The required amount of memory for the delta search window is however multiplied by the number of threads\&. Specifying 0 will cause Git to auto\-detect the number of CPU\(cqs and use maximum 3 threads\&.
  151. .RE
  152. .PP
  153. \-\-max\-input\-size=<size>
  154. .RS 4
  155. Die, if the pack is larger than <size>\&.
  156. .RE
  157. .PP
  158. \-\-object\-format=<hash\-algorithm>
  159. .RS 4
  160. Specify the given object format (hash algorithm) for the pack\&. The valid values are
  161. \fIsha1\fR
  162. and (if enabled)
  163. \fIsha256\fR\&. The default is the algorithm for the current repository (set by
  164. \fBextensions\&.objectFormat\fR), or
  165. \fIsha1\fR
  166. if no value is set or outside a repository\&.
  167. .sp
  168. This option cannot be used with \-\-stdin\&.
  169. .sp
  170. Note: At present, there is no interoperability between SHA\-256 repositories and SHA\-1 repositories\&.
  171. .RE
  172. .sp
  173. Historically, we warned that SHA\-256 repositories may later need backward incompatible changes when we introduce such interoperability features\&. Today, we only expect compatible changes\&. Furthermore, if such changes prove to be necessary, it can be expected that SHA\-256 repositories created with today\(cqs Git will be usable by future versions of Git without data loss\&.
  174. .PP
  175. \-\-promisor[=<message>]
  176. .RS 4
  177. Before committing the pack\-index, create a \&.promisor file for this pack\&. Particularly helpful when writing a promisor pack with \-\-fix\-thin since the name of the pack is not final until the pack has been fully written\&. If a
  178. \fI<message>\fR
  179. is provided, then that content will be written to the \&.promisor file for future reference\&. See
  180. \m[blue]\fBpartial clone\fR\m[]\&\s-2\u[1]\d\s+2
  181. for more information\&.
  182. .sp
  183. Also, if there are objects in the given pack that references non\-promisor objects (in the repo), repacks those non\-promisor objects into a promisor pack\&. This avoids a situation in which a repo has non\-promisor objects that are accessible through promisor objects\&.
  184. .sp
  185. Requires <pack\-file> to not be specified\&.
  186. .RE
  187. .SH "NOTES"
  188. .sp
  189. Once the index has been created, the hash that goes into the name of the pack/idx file is printed to stdout\&. If \-\-stdin was also used then this is prefixed by either "pack\et", or "keep\et" if a new \&.keep file was successfully created\&. This is useful to remove a \&.keep file used as a lock to prevent the race with \fIgit repack\fR mentioned above\&.
  190. .SH "GIT"
  191. .sp
  192. Part of the \fBgit\fR(1) suite
  193. .SH "NOTES"
  194. .IP " 1." 4
  195. partial clone
  196. .RS 4
  197. \%git-htmldocs/technical/partial-clone.html
  198. .RE