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.44.0.53.g0f9d4d28b7
10 .TH "GIT\-MULTI\-PACK\-INDEX" "1" "2024\-02\-27" "Git 2\&.44\&.0\&.53\&.g0f9d4d2" "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 (with the exception of
118 packs and cruft packs)\&. Rewrite the MIDX file afterward to remove all references to these pack\-files\&.
123 Create a new pack\-file containing objects in small pack\-files referenced by the multi\-pack\-index\&. If the size given by the
124 \fB\-\-batch\-size=<size>\fR
125 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
126 \fIgit multi\-pack\-index expire\fR
127 will delete the pack\-files that were part of this batch\&.
130 \fBrepack\&.packKeptObjects\fR
132 \fBfalse\fR, then any pack\-files with an associated
134 file will not be selected for the batch to repack\&.
146 Write a MIDX file for the packfiles in the current
154 $ git multi\-pack\-index write
170 Write a MIDX file for the packfiles in the current
172 directory with a corresponding bitmap\&.
178 $ git multi\-pack\-index write \-\-preferred\-pack=<pack> \-\-bitmap
194 Write a MIDX file for the packfiles in an alternate object store\&.
200 $ git multi\-pack\-index \-\-object\-dir <alt> write
216 Verify the MIDX file for the packfiles in the current
224 $ git multi\-pack\-index verify
233 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\&.
236 Part of the \fBgit\fR(1) suite
239 The Multi-Pack-Index Design Document
241 \%git-htmldocs/technical/multi-pack-index.html