1GIT-MULTI-PACK-IN(1)              Git Manual              GIT-MULTI-PACK-IN(1)
2
3
4

NAME

6       git-multi-pack-index - Write and verify multi-pack-indexes
7

SYNOPSIS

9       git multi-pack-index [--object-dir=<dir>] [--[no-]bitmap] <sub-command>
10

DESCRIPTION

12       Write or verify a multi-pack-index (MIDX) file.
13

OPTIONS

15       --object-dir=<dir>
16           Use given directory for the location of Git objects. We check
17           <dir>/packs/multi-pack-index for the current MIDX file, and
18           <dir>/packs for the pack-files to index.
19
20           <dir> must be an alternate of the current repository.
21
22       --[no-]progress
23           Turn progress on/off explicitly. If neither is specified, progress
24           is shown if standard error is connected to a terminal. Supported by
25           sub-commands write, verify, expire, and `repack.
26
27       The following subcommands are available:
28
29       write
30           Write a new MIDX file. The following options are available for the
31           write sub-command:
32
33           --preferred-pack=<pack>
34               Optionally specify the tie-breaking pack used when multiple
35               packs contain the same object.  <pack> must contain at least
36               one object. If not given, ties are broken in favor of the pack
37               with the lowest mtime.
38
39           --[no-]bitmap
40               Control whether or not a multi-pack bitmap is written.
41
42           --stdin-packs
43               Write a multi-pack index containing only the set of
44               line-delimited pack index basenames provided over stdin.
45
46           --refs-snapshot=<path>
47               With --bitmap, optionally specify a file which contains a "refs
48               snapshot" taken prior to repacking.
49
50               A reference snapshot is composed of line-delimited OIDs
51               corresponding to the reference tips, usually taken by git
52               repack prior to generating a new pack. A line may optionally
53               start with a + character to indicate that the reference which
54               corresponds to that OID is "preferred" (see git-config(1)'s
55               pack.preferBitmapTips.)
56
57               The file given at <path> is expected to be readable, and can
58               contain duplicates. (If a given OID is given more than once, it
59               is marked as preferred if at least one instance of it begins
60               with the special + marker).
61
62       verify
63           Verify the contents of the MIDX file.
64
65       expire
66           Delete the pack-files that are tracked by the MIDX file, but have
67           no objects referenced by the MIDX. Rewrite the MIDX file afterward
68           to remove all references to these pack-files.
69
70       repack
71           Create a new pack-file containing objects in small pack-files
72           referenced by the multi-pack-index. If the size given by the
73           --batch-size=<size> argument is zero, then create a pack containing
74           all objects referenced by the multi-pack-index. For a non-zero
75           batch size, Select the pack-files by examining packs from
76           oldest-to-newest, computing the "expected size" by counting the
77           number of objects in the pack referenced by the multi-pack-index,
78           then divide by the total number of objects in the pack and multiply
79           by the pack size. We select packs with expected size below the
80           batch size until the set of packs have total expected size at least
81           the batch size, or all pack-files are considered. If only one
82           pack-file is selected, then do nothing. If a new pack-file is
83           created, rewrite the multi-pack-index to reference the new
84           pack-file. A later run of git multi-pack-index expire will delete
85           the pack-files that were part of this batch.
86
87           If repack.packKeptObjects is false, then any pack-files with an
88           associated .keep file will not be selected for the batch to repack.
89

EXAMPLES

91       •   Write a MIDX file for the packfiles in the current .git directory.
92
93               $ git multi-pack-index write
94
95       •   Write a MIDX file for the packfiles in the current .git directory
96           with a corresponding bitmap.
97
98               $ git multi-pack-index write --preferred-pack=<pack> --bitmap
99
100       •   Write a MIDX file for the packfiles in an alternate object store.
101
102               $ git multi-pack-index --object-dir <alt> write
103
104       •   Verify the MIDX file for the packfiles in the current .git
105           directory.
106
107               $ git multi-pack-index verify
108

SEE ALSO

110       See The Multi-Pack-Index Design Document[1] and The Multi-Pack-Index
111       Format[2] for more information on the multi-pack-index feature.
112

GIT

114       Part of the git(1) suite
115

NOTES

117        1. The Multi-Pack-Index Design Document
118           file:///usr/share/doc/git/technical/multi-pack-index.html
119
120        2. The Multi-Pack-Index Format
121           file:///usr/share/doc/git/technical/pack-format.html
122
123
124
125Git 2.36.1                        2022-05-05              GIT-MULTI-PACK-IN(1)
Impressum