'\" t
.\"     Title: git-multi-pack-index
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\"      Date: 02/26/2025
.\"    Manual: Git Manual
.\"    Source: Git 2.25.1
.\"  Language: English
.\"
.TH "GIT\-MULTI\-PACK\-IN" "1" "02/26/2025" "Git 2\&.25\&.1" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-multi-pack-index \- Write and verify multi\-pack\-indexes
.SH "SYNOPSIS"
.sp
.nf
\fIgit multi\-pack\-index\fR [\-\-object\-dir=<dir>] [\-\-[no\-]progress] <subcommand>
.fi
.sp
.SH "DESCRIPTION"
.sp
Write or verify a multi\-pack\-index (MIDX) file\&.
.SH "OPTIONS"
.PP
\-\-object\-dir=<dir>
.RS 4
Use given directory for the location of Git objects\&. We check
\fB<dir>/packs/multi\-pack\-index\fR
for the current MIDX file, and
\fB<dir>/packs\fR
for the pack\-files to index\&.
.RE
.PP
\-\-[no\-]progress
.RS 4
Turn progress on/off explicitly\&. If neither is specified, progress is shown if standard error is connected to a terminal\&.
.RE
.sp
The following subcommands are available:
.PP
write
.RS 4
Write a new MIDX file\&.
.RE
.PP
verify
.RS 4
Verify the contents of the MIDX file\&.
.RE
.PP
expire
.RS 4
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\&.
.RE
.PP
repack
.RS 4
Create a new pack\-file containing objects in small pack\-files referenced by the multi\-pack\-index\&. If the size given by the
\fB\-\-batch\-size=<size>\fR
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\&. If the total size does not reach the batch size, 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
\fIgit multi\-pack\-index expire\fR
will delete the pack\-files that were part of this batch\&.
.RE
.SH "EXAMPLES"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Write a MIDX file for the packfiles in the current \&.git folder\&.
.sp
.if n \{\
.RS 4
.\}
.nf
$ git multi\-pack\-index write
.fi
.if n \{\
.RE
.\}
.sp
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Write a MIDX file for the packfiles in an alternate object store\&.
.sp
.if n \{\
.RS 4
.\}
.nf
$ git multi\-pack\-index \-\-object\-dir <alt> write
.fi
.if n \{\
.RE
.\}
.sp
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Verify the MIDX file for the packfiles in the current \&.git folder\&.
.sp
.if n \{\
.RS 4
.\}
.nf
$ git multi\-pack\-index verify
.fi
.if n \{\
.RE
.\}
.sp
.RE
.SH "SEE ALSO"
.sp
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\&.
.SH "GIT"
.sp
Part of the \fBgit\fR(1) suite
.SH "NOTES"
.IP " 1." 4
The Multi-Pack-Index Design Document
.RS 4
\%file:///usr/share/doc/git/html/technical/multi-pack-index.html
.RE
.IP " 2." 4
The Multi-Pack-Index Format
.RS 4
\%file:///usr/share/doc/git/html/technical/pack-format.html
.RE
