]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-multi-pack-index.txt
Merge branch 'ab/test-lib-updates'
[thirdparty/git.git] / Documentation / git-multi-pack-index.txt
CommitLineData
6a257f03
DS
1git-multi-pack-index(1)
2=======================
3
4NAME
5----
6git-multi-pack-index - Write and verify multi-pack-indexes
7
8
9SYNOPSIS
10--------
11[verse]
9218c6a4
TB
12'git multi-pack-index' [--object-dir=<dir>] [--[no-]progress]
13 [--preferred-pack=<pack>] <subcommand>
6a257f03
DS
14
15DESCRIPTION
16-----------
17Write or verify a multi-pack-index (MIDX) file.
18
19OPTIONS
20-------
21
22--object-dir=<dir>::
23 Use given directory for the location of Git objects. We check
24 `<dir>/packs/multi-pack-index` for the current MIDX file, and
25 `<dir>/packs` for the pack-files to index.
26
680cba2c
WB
27--[no-]progress::
28 Turn progress on/off explicitly. If neither is specified, progress is
29 shown if standard error is connected to a terminal.
30
81efa161
DS
31The following subcommands are available:
32
a3407730 33write::
9218c6a4
TB
34 Write a new MIDX file. The following options are available for
35 the `write` sub-command:
36+
37--
38 --preferred-pack=<pack>::
39 Optionally specify the tie-breaking pack used when
40 multiple packs contain the same object. If not given,
41 ties are broken in favor of the pack with the lowest
42 mtime.
43--
a3407730 44
56ee7ff1 45verify::
81efa161 46 Verify the contents of the MIDX file.
56ee7ff1 47
cff97116
DS
48expire::
49 Delete the pack-files that are tracked by the MIDX file, but
50 have no objects referenced by the MIDX. Rewrite the MIDX file
51 afterward to remove all references to these pack-files.
52
2af890bb
DS
53repack::
54 Create a new pack-file containing objects in small pack-files
55 referenced by the multi-pack-index. If the size given by the
56 `--batch-size=<size>` argument is zero, then create a pack
57 containing all objects referenced by the multi-pack-index. For
58 a non-zero batch size, Select the pack-files by examining packs
59 from oldest-to-newest, computing the "expected size" by counting
60 the number of objects in the pack referenced by the
61 multi-pack-index, then divide by the total number of objects in
62 the pack and multiply by the pack size. We select packs with
63 expected size below the batch size until the set of packs have
1eb22c7d
DS
64 total expected size at least the batch size, or all pack-files
65 are considered. If only one pack-file is selected, then do
66 nothing. If a new pack-file is created, rewrite the
67 multi-pack-index to reference the new pack-file. A later run of
68 'git multi-pack-index expire' will delete the pack-files that
69 were part of this batch.
3ce4ca0a
DS
70+
71If `repack.packKeptObjects` is `false`, then any pack-files with an
72associated `.keep` file will not be selected for the batch to repack.
2af890bb 73
a3407730
DS
74
75EXAMPLES
76--------
77
78* Write a MIDX file for the packfiles in the current .git folder.
79+
80-----------------------------------------------
81$ git multi-pack-index write
82-----------------------------------------------
83
84* Write a MIDX file for the packfiles in an alternate object store.
85+
86-----------------------------------------------
87$ git multi-pack-index --object-dir <alt> write
88-----------------------------------------------
89
56ee7ff1
DS
90* Verify the MIDX file for the packfiles in the current .git folder.
91+
92-----------------------------------------------
93$ git multi-pack-index verify
94-----------------------------------------------
95
6a257f03
DS
96
97SEE ALSO
98--------
99See link:technical/multi-pack-index.html[The Multi-Pack-Index Design
100Document] and link:technical/pack-format.html[The Multi-Pack-Index
101Format] for more information on the multi-pack-index feature.
102
103
104GIT
105---
106Part of the linkgit:git[1] suite