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