Derrick Stolee | 6a257f0 | 2018-07-12 15:39:20 -0400 | [diff] [blame] | 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] |
William Baker | 680cba2 | 2019-10-21 18:40:03 +0000 | [diff] [blame] | 12 | 'git multi-pack-index' [--object-dir=<dir>] [--[no-]progress] <subcommand> |
Derrick Stolee | 6a257f0 | 2018-07-12 15:39:20 -0400 | [diff] [blame] | 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 | |
William Baker | 680cba2 | 2019-10-21 18:40:03 +0000 | [diff] [blame] | 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 | |
Derrick Stolee | 81efa16 | 2019-06-10 16:35:22 -0700 | [diff] [blame] | 30 | The following subcommands are available: |
| 31 | |
Derrick Stolee | a340773 | 2018-07-12 15:39:21 -0400 | [diff] [blame] | 32 | write:: |
Derrick Stolee | 81efa16 | 2019-06-10 16:35:22 -0700 | [diff] [blame] | 33 | Write a new MIDX file. |
Derrick Stolee | a340773 | 2018-07-12 15:39:21 -0400 | [diff] [blame] | 34 | |
Derrick Stolee | 56ee7ff | 2018-09-13 11:02:13 -0700 | [diff] [blame] | 35 | verify:: |
Derrick Stolee | 81efa16 | 2019-06-10 16:35:22 -0700 | [diff] [blame] | 36 | Verify the contents of the MIDX file. |
Derrick Stolee | 56ee7ff | 2018-09-13 11:02:13 -0700 | [diff] [blame] | 37 | |
Derrick Stolee | cff9711 | 2019-06-10 16:35:23 -0700 | [diff] [blame] | 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 | |
Derrick Stolee | 2af890b | 2019-06-10 16:35:26 -0700 | [diff] [blame] | 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 |
| 54 | total expected size at least the batch size. If the total size |
| 55 | does not reach the batch size, then do nothing. If a new pack- |
| 56 | file is created, rewrite the multi-pack-index to reference the |
| 57 | new pack-file. A later run of 'git multi-pack-index expire' will |
| 58 | delete the pack-files that were part of this batch. |
| 59 | |
Derrick Stolee | a340773 | 2018-07-12 15:39:21 -0400 | [diff] [blame] | 60 | |
| 61 | EXAMPLES |
| 62 | -------- |
| 63 | |
| 64 | * Write a MIDX file for the packfiles in the current .git folder. |
| 65 | + |
| 66 | ----------------------------------------------- |
| 67 | $ git multi-pack-index write |
| 68 | ----------------------------------------------- |
| 69 | |
| 70 | * Write a MIDX file for the packfiles in an alternate object store. |
| 71 | + |
| 72 | ----------------------------------------------- |
| 73 | $ git multi-pack-index --object-dir <alt> write |
| 74 | ----------------------------------------------- |
| 75 | |
Derrick Stolee | 56ee7ff | 2018-09-13 11:02:13 -0700 | [diff] [blame] | 76 | * Verify the MIDX file for the packfiles in the current .git folder. |
| 77 | + |
| 78 | ----------------------------------------------- |
| 79 | $ git multi-pack-index verify |
| 80 | ----------------------------------------------- |
| 81 | |
Derrick Stolee | 6a257f0 | 2018-07-12 15:39:20 -0400 | [diff] [blame] | 82 | |
| 83 | SEE ALSO |
| 84 | -------- |
| 85 | See link:technical/multi-pack-index.html[The Multi-Pack-Index Design |
| 86 | Document] and link:technical/pack-format.html[The Multi-Pack-Index |
| 87 | Format] for more information on the multi-pack-index feature. |
| 88 | |
| 89 | |
| 90 | GIT |
| 91 | --- |
| 92 | Part of the linkgit:git[1] suite |