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/>
7 .\" Source: Git 2.46.1.565.g6531f31ef3
10 .TH "GIT\-MULTI\-PACK\-INDEX" "1" "2024-09-18" "Git 2\&.46\&.1\&.565\&.g6531f3" "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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 git-multi-pack-index \- Write and verify multi\-pack\-indexes
35 \fIgit multi\-pack\-index\fR [\-\-object\-dir=<dir>] [\-\-[no\-]bitmap] <sub\-command>
39 Write or verify a multi\-pack\-index (MIDX) file\&.
44 Use given directory for the location of Git objects\&. We check
45 \fB<dir>/packs/multi\-pack\-index\fR
46 for the current MIDX file, and
48 for the pack\-files to index\&.
51 must be an alternate of the current repository\&.
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
59 \fBexpire\fR, and `repack\&.
62 The following subcommands are available:
66 Write a new MIDX file\&. The following options are available for the
70 \-\-preferred\-pack=<pack>
72 Optionally specify the tie\-breaking pack used when multiple packs contain the same object\&.
74 must contain at least one object\&. If not given, ties are broken in favor of the pack with the lowest mtime\&.
79 Control whether or not a multi\-pack bitmap is written\&.
84 Write a multi\-pack index containing only the set of line\-delimited pack index basenames provided over stdin\&.
87 \-\-refs\-snapshot=<path>
90 \fB\-\-bitmap\fR, optionally specify a file which contains a "refs snapshot" taken prior to repacking\&.
92 A reference snapshot is composed of line\-delimited OIDs corresponding to the reference tips, usually taken by
94 prior to generating a new pack\&. A line may optionally start with a
96 character to indicate that the reference which corresponds to that OID is "preferred" (see
97 \fBgit-config\fR(1)\*(Aqs
98 \fBpack\&.preferBitmapTips\fR\&.)
102 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
109 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
116 Verify the contents of the MIDX file\&.
121 Delete the pack\-files that are tracked by the MIDX file, but have no objects referenced by the MIDX (with the exception of
123 packs and cruft packs)\&. Rewrite the MIDX file afterward to remove all references to these pack\-files\&.
129 .nr an-no-space-flag 1
136 this mode is incompatible with incremental MIDX files\&.
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=<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\&.
150 \fBrepack\&.packKeptObjects\fR
152 \fBfalse\fR, then any pack\-files with an associated
154 file will not be selected for the batch to repack\&.
160 .nr an-no-space-flag 1
167 this mode is incompatible with incremental MIDX files\&.
181 Write a MIDX file for the packfiles in the current
189 $ git multi\-pack\-index write
204 Write a MIDX file for the packfiles in the current
206 directory with a corresponding bitmap\&.
212 $ git multi\-pack\-index write \-\-preferred\-pack=<pack> \-\-bitmap
227 Write a MIDX file for the packfiles in an alternate object store\&.
233 $ git multi\-pack\-index \-\-object\-dir <alt> write
248 Verify the MIDX file for the packfiles in the current
256 $ git multi\-pack\-index verify
264 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\&.
267 Part of the \fBgit\fR(1) suite
270 The Multi-Pack-Index Design Document
272 \%git-htmldocs/technical/multi-pack-index.html