]> git.ipfire.org Git - thirdparty/git.git/blob - Documentation/git-multi-pack-index.txt
Merge branch 'ab/test-lib-updates'
[thirdparty/git.git] / Documentation / git-multi-pack-index.txt
1 git-multi-pack-index(1)
2 =======================
3
4 NAME
5 ----
6 git-multi-pack-index - Write and verify multi-pack-indexes
7
8
9 SYNOPSIS
10 --------
11 [verse]
12 'git multi-pack-index' [--object-dir=<dir>] [--[no-]progress]
13 [--preferred-pack=<pack>] <subcommand>
14
15 DESCRIPTION
16 -----------
17 Write or verify a multi-pack-index (MIDX) file.
18
19 OPTIONS
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
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
31 The following subcommands are available:
32
33 write::
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 --
44
45 verify::
46 Verify the contents of the MIDX file.
47
48 expire::
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
53 repack::
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
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.
70 +
71 If `repack.packKeptObjects` is `false`, then any pack-files with an
72 associated `.keep` file will not be selected for the batch to repack.
73
74
75 EXAMPLES
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
90 * Verify the MIDX file for the packfiles in the current .git folder.
91 +
92 -----------------------------------------------
93 $ git multi-pack-index verify
94 -----------------------------------------------
95
96
97 SEE ALSO
98 --------
99 See link:technical/multi-pack-index.html[The Multi-Pack-Index Design
100 Document] and link:technical/pack-format.html[The Multi-Pack-Index
101 Format] for more information on the multi-pack-index feature.
102
103
104 GIT
105 ---
106 Part of the linkgit:git[1] suite