2 .\" Title: git-multi-pack-index
3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
7 .\" Source: Git 2.34.1.8.g35151cf072
10 .TH "GIT\-MULTI\-PACK\-IN" "1" "11/24/2021" "Git 2\&.34\&.1\&.8\&.g35151cf0" "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>
40 Write or verify a multi\-pack\-index (MIDX) file\&.
45 Use given directory for the location of Git objects\&. We check
46 \fB<dir>/packs/multi\-pack\-index\fR
47 for the current MIDX file, and
49 for the pack\-files to index\&.
52 must be an alternate of the current repository\&.
57 Turn progress on/off explicitly\&. If neither is specified, progress is shown if standard error is connected to a terminal\&. Supported by sub\-commands
60 \fBexpire\fR, and `repack\&.
63 The following subcommands are available:
67 Write a new MIDX file\&. The following options are available for the
71 \-\-preferred\-pack=<pack>
73 Optionally specify the tie\-breaking pack used when multiple packs contain the same object\&.
75 must contain at least one object\&. If not given, ties are broken in favor of the pack with the lowest mtime\&.
80 Control whether or not a multi\-pack bitmap is written\&.
85 Write a multi\-pack index containing only the set of line\-delimited pack index basenames provided over stdin\&.
88 \-\-refs\-snapshot=<path>
91 \fB\-\-bitmap\fR, optionally specify a file which contains a "refs snapshot" taken prior to repacking\&.
93 A reference snapshot is composed of line\-delimited OIDs corresponding to the reference tips, usually taken by
95 prior to generating a new pack\&. A line may optionally start with a
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\&.)
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
111 Verify the contents of the MIDX file\&.
116 Delete the pack\-files that are tracked by the MIDX file, but have no objects referenced by the MIDX\&. Rewrite the MIDX file afterward to remove all references to these pack\-files\&.
121 Create a new pack\-file containing objects in small pack\-files referenced by the multi\-pack\-index\&. If the size given by the
122 \fB\-\-batch\-size=<size>\fR
123 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
124 \fIgit multi\-pack\-index expire\fR
125 will delete the pack\-files that were part of this batch\&.
128 \fBrepack\&.packKeptObjects\fR
130 \fBfalse\fR, then any pack\-files with an associated
132 file will not be selected for the batch to repack\&.
144 Write a MIDX file for the packfiles in the current
152 $ git multi\-pack\-index write
168 Write a MIDX file for the packfiles in the current
170 directory with a corresponding bitmap\&.
176 $ git multi\-pack\-index write \-\-preferred\-pack=<pack> \-\-bitmap
192 Write a MIDX file for the packfiles in an alternate object store\&.
198 $ git multi\-pack\-index \-\-object\-dir <alt> write
214 Verify the MIDX file for the packfiles in the current
222 $ git multi\-pack\-index verify
231 See \m[blue]\fBThe Multi\-Pack\-Index Design Document\fR\m[]\&\s-2\u[1]\d\s+2 and \m[blue]\fBThe Multi\-Pack\-Index Format\fR\m[]\&\s-2\u[2]\d\s+2 for more information on the multi\-pack\-index feature\&.
234 Part of the \fBgit\fR(1) suite
237 The Multi-Pack-Index Design Document
239 \%git-htmldocs/technical/multi-pack-index.html
242 The Multi-Pack-Index Format
244 \%git-htmldocs/technical/pack-format.html