]>
Commit | Line | Data |
---|---|---|
215a7ad1 JH |
1 | git-repack(1) |
2 | ============= | |
e31bb3bb JH |
3 | |
4 | NAME | |
5 | ---- | |
c3f0baac | 6 | git-repack - Pack unpacked objects in a repository |
e31bb3bb JH |
7 | |
8 | ||
9 | SYNOPSIS | |
10 | -------- | |
02ac04fc | 11 | 'git-repack' [-a] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N] |
e31bb3bb JH |
12 | |
13 | DESCRIPTION | |
14 | ----------- | |
e31bb3bb | 15 | |
f85a4191 JH |
16 | This script is used to combine all objects that do not currently |
17 | reside in a "pack", into a pack. | |
18 | ||
19 | A pack is a collection of objects, individually compressed, with | |
20 | delta compression applied, stored in a single file, with an | |
21 | associated index file. | |
22 | ||
23 | Packs are used to reduce the load on mirror systems, backup | |
24 | engines, disk storage, etc. | |
25 | ||
26 | OPTIONS | |
27 | ------- | |
28 | ||
29 | -a:: | |
30 | Instead of incrementally packing the unpacked objects, | |
31 | pack everything available into a single pack. | |
32 | Especially useful when packing a repository that is used | |
33 | for a private development and there no need to worry | |
34 | about people fetching via dumb protocols from it. Use | |
35 | with '-d'. | |
36 | ||
37 | -d:: | |
38 | After packing, if the newly created packs make some | |
39 | existing packs redundant, remove the redundant packs. | |
2b5f3ed3 | 40 | Also runs gitlink:git-prune-packed[1]. |
e31bb3bb | 41 | |
31f23281 NW |
42 | -l:: |
43 | Pass the `--local` option to `git pack-objects`, see | |
44 | gitlink:git-pack-objects[1]. | |
45 | ||
cec2be76 JH |
46 | -f:: |
47 | Pass the `--no-reuse-delta` option to `git pack-objects`, see | |
48 | gitlink:git-pack-objects[1]. | |
49 | ||
50 | -q:: | |
51 | Pass the `-q` option to `git pack-objects`, see | |
52 | gitlink:git-pack-objects[1]. | |
53 | ||
31f23281 NW |
54 | -n:: |
55 | Do not update the server information with | |
56 | `git update-server-info`. | |
e31bb3bb | 57 | |
02ac04fc | 58 | --window=[N], --depth=[N]:: |
3df19671 | 59 | These two options affect how the objects contained in the pack are |
02ac04fc JF |
60 | stored using delta compression. The objects are first internally |
61 | sorted by type, size and optionally names and compared against the | |
62 | other objects within `--window` to see if using delta compression saves | |
63 | space. `--depth` limits the maximum delta depth; making it too deep | |
64 | affects the performance on the unpacker side, because delta data needs | |
65 | to be applied that many times to get to the necessary object. | |
3df19671 | 66 | The default value for both --window and --depth is 10. |
02ac04fc JF |
67 | |
68 | ||
b6945f57 JH |
69 | Configuration |
70 | ------------- | |
71 | ||
72 | When configuration variable `repack.UseDeltaBaseOffset` is set | |
73 | for the repository, the command passes `--delta-base-offset` | |
74 | option to `git-pack-objects`; this typically results in slightly | |
75 | smaller packs, but the generated packs are incompatible with | |
76 | versions of git older than (and including) v1.4.3; do not set | |
77 | the variable in a repository that older version of git needs to | |
78 | be able to read (this includes repositories from which packs can | |
79 | be copied out over http or rsync, and people who obtained packs | |
80 | that way can try to use older git with it). | |
81 | ||
82 | ||
e31bb3bb JH |
83 | Author |
84 | ------ | |
85 | Written by Linus Torvalds <torvalds@osdl.org> | |
86 | ||
87 | Documentation | |
88 | -------------- | |
89 | Documentation by Ryan Anderson <ryan@michonline.com> | |
90 | ||
46444f51 | 91 | See Also |
e31bb3bb | 92 | -------- |
df8baa42 JF |
93 | gitlink:git-pack-objects[1] |
94 | gitlink:git-prune-packed[1] | |
e31bb3bb JH |
95 | |
96 | GIT | |
97 | --- | |
a7154e91 | 98 | Part of the gitlink:git[7] suite |
e31bb3bb | 99 |