| '\" t |
| .\" Title: git-multi-pack-index |
| .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] |
| .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> |
| .\" Date: 2024-04-24 |
| .\" Manual: Git Manual |
| .\" Source: Git 2.45.0.rc1.1.g9f32d8da7a |
| .\" Language: English |
| .\" |
| .TH "GIT\-MULTI\-PACK\-INDEX" "1" "2024\-04\-24" "Git 2\&.45\&.0\&.rc1\&.1\&.g9f" "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\-]bitmap] <sub\-command> |
| .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\&. |
| .sp |
| \fB<dir>\fR |
| must be an alternate of the current repository\&. |
| .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\&. Supported by sub\-commands |
| \fBwrite\fR, |
| \fBverify\fR, |
| \fBexpire\fR, and `repack\&. |
| .RE |
| .sp |
| The following subcommands are available: |
| .PP |
| write |
| .RS 4 |
| Write a new MIDX file\&. The following options are available for the |
| \fBwrite\fR |
| sub\-command: |
| .PP |
| \-\-preferred\-pack=<pack> |
| .RS 4 |
| Optionally specify the tie\-breaking pack used when multiple packs contain the same object\&. |
| \fB<pack>\fR |
| must contain at least one object\&. If not given, ties are broken in favor of the pack with the lowest mtime\&. |
| .RE |
| .PP |
| \-\-[no\-]bitmap |
| .RS 4 |
| Control whether or not a multi\-pack bitmap is written\&. |
| .RE |
| .PP |
| \-\-stdin\-packs |
| .RS 4 |
| Write a multi\-pack index containing only the set of line\-delimited pack index basenames provided over stdin\&. |
| .RE |
| .PP |
| \-\-refs\-snapshot=<path> |
| .RS 4 |
| With |
| \fB\-\-bitmap\fR, optionally specify a file which contains a "refs snapshot" taken prior to repacking\&. |
| .sp |
| A reference snapshot is composed of line\-delimited OIDs corresponding to the reference tips, usually taken by |
| \fBgit repack\fR |
| prior to generating a new pack\&. A line may optionally start with a |
| \fB+\fR |
| character to indicate that the reference which corresponds to that OID is "preferred" (see |
| \fBgit-config\fR(1)\*(Aqs |
| \fBpack\&.preferBitmapTips\fR\&.) |
| .sp |
| The file given at |
| \fB<path>\fR |
| 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 |
| \fB+\fR |
| marker)\&. |
| .RE |
| .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 (with the exception of |
| \fB\&.keep\fR |
| packs and cruft packs)\&. 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, 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 |
| \fIgit multi\-pack\-index expire\fR |
| will delete the pack\-files that were part of this batch\&. |
| .sp |
| If |
| \fBrepack\&.packKeptObjects\fR |
| is |
| \fBfalse\fR, then any pack\-files with an associated |
| \fB\&.keep\fR |
| file will not be selected for the batch to repack\&. |
| .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 |
| \fB\&.git\fR |
| directory\&. |
| .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 the current |
| \fB\&.git\fR |
| directory with a corresponding bitmap\&. |
| .sp |
| .if n \{\ |
| .RS 4 |
| .\} |
| .nf |
| $ git multi\-pack\-index write \-\-preferred\-pack=<pack> \-\-bitmap |
| .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 |
| \fB\&.git\fR |
| directory\&. |
| .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 \fBgitformat-pack\fR(5) for more information on the multi\-pack\-index feature and its file format\&. |
| .SH "GIT" |
| .sp |
| Part of the \fBgit\fR(1) suite |
| .SH "NOTES" |
| .IP " 1." 4 |
| The Multi-Pack-Index Design Document |
| .RS 4 |
| \%git-htmldocs/technical/multi-pack-index.html |
| .RE |