1GIT-MULTI-PACK-IN(1) Git Manual GIT-MULTI-PACK-IN(1)
2
3
4
6 git-multi-pack-index - Write and verify multi-pack-indexes
7
9 git multi-pack-index [--object-dir=<dir>] [--[no-]bitmap] <sub-command>
10
12 Write or verify a multi-pack-index (MIDX) file.
13
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 (with the exception of .keep
68 packs and cruft packs). Rewrite the MIDX file afterward to remove
69 all references to these pack-files.
70
71 repack
72 Create a new pack-file containing objects in small pack-files
73 referenced by the multi-pack-index. If the size given by the
74 --batch-size=<size> argument is zero, then create a pack containing
75 all objects referenced by the multi-pack-index. For a non-zero
76 batch size, Select the pack-files by examining packs from
77 oldest-to-newest, computing the "expected size" by counting the
78 number of objects in the pack referenced by the multi-pack-index,
79 then divide by the total number of objects in the pack and multiply
80 by the pack size. We select packs with expected size below the
81 batch size until the set of packs have total expected size at least
82 the batch size, or all pack-files are considered. If only one
83 pack-file is selected, then do nothing. If a new pack-file is
84 created, rewrite the multi-pack-index to reference the new
85 pack-file. A later run of git multi-pack-index expire will delete
86 the pack-files that were part of this batch.
87
88 If repack.packKeptObjects is false, then any pack-files with an
89 associated .keep file will not be selected for the batch to repack.
90
92 • Write a MIDX file for the packfiles in the current .git directory.
93
94 $ git multi-pack-index write
95
96 • Write a MIDX file for the packfiles in the current .git directory
97 with a corresponding bitmap.
98
99 $ git multi-pack-index write --preferred-pack=<pack> --bitmap
100
101 • Write a MIDX file for the packfiles in an alternate object store.
102
103 $ git multi-pack-index --object-dir <alt> write
104
105 • Verify the MIDX file for the packfiles in the current .git
106 directory.
107
108 $ git multi-pack-index verify
109
111 See The Multi-Pack-Index Design Document[1] and gitformat-pack(5) for
112 more information on the multi-pack-index feature and its file format.
113
115 Part of the git(1) suite
116
118 1. The Multi-Pack-Index Design Document
119 file:///usr/share/doc/git/technical/multi-pack-index.html
120
121
122
123Git 2.39.1 2023-01-13 GIT-MULTI-PACK-IN(1)