pay attention to DESTDIR when building with NO_PERL_MAKEMAKER
[git/dscho.git] / Documentation / git-repack.txt
blobc9257a10c956432fdd2e456c7f910cc2996c1534
1 git-repack(1)
2 =============
4 NAME
5 ----
6 git-repack - Pack unpacked objects in a repository
9 SYNOPSIS
10 --------
11 'git repack' [-a] [-A] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N]
13 DESCRIPTION
14 -----------
16 This script is used to combine all objects that do not currently
17 reside in a "pack", into a pack.  It can also be used to re-organize
18 existing packs into a single, more efficient pack.
20 A pack is a collection of objects, individually compressed, with
21 delta compression applied, stored in a single file, with an
22 associated index file.
24 Packs are used to reduce the load on mirror systems, backup
25 engines, disk storage, etc.
27 OPTIONS
28 -------
30 -a::
31         Instead of incrementally packing the unpacked objects,
32         pack everything referenced into a single pack.
33         Especially useful when packing a repository that is used
34         for private development. Use
35         with '-d'.  This will clean up the objects that `git prune`
36         leaves behind, but `git fsck --full` shows as
37         dangling.
39 Note that users fetching over dumb protocols will have to fetch the
40 whole new pack in order to get any contained object, no matter how many
41 other objects in that pack they already have locally.
43 -A::
44         Same as `-a`, unless '-d' is used.  Then any unreachable
45         objects in a previous pack become loose, unpacked objects,
46         instead of being left in the old pack.  Unreachable objects
47         are never intentionally added to a pack, even when repacking.
48         This option prevents unreachable objects from being immediately
49         deleted by way of being left in the old pack and then
50         removed.  Instead, the loose unreachable objects
51         will be pruned according to normal expiry rules
52         with the next 'git-gc' invocation. See linkgit:git-gc[1].
54 -d::
55         After packing, if the newly created packs make some
56         existing packs redundant, remove the redundant packs.
57         Also run  'git-prune-packed' to remove redundant
58         loose object files.
60 -l::
61         Pass the `--local` option to 'git-pack-objects'. See
62         linkgit:git-pack-objects[1].
64 -f::
65         Pass the `--no-reuse-object` option to `git-pack-objects`, see
66         linkgit:git-pack-objects[1].
68 -q::
69         Pass the `-q` option to 'git-pack-objects'. See
70         linkgit:git-pack-objects[1].
72 -n::
73         Do not update the server information with
74         'git-update-server-info'.  This option skips
75         updating local catalog files needed to publish
76         this repository (or a direct copy of it)
77         over HTTP or FTP.  See linkgit:git-update-server-info[1].
79 --window=[N]::
80 --depth=[N]::
81         These two options affect how the objects contained in the pack are
82         stored using delta compression. The objects are first internally
83         sorted by type, size and optionally names and compared against the
84         other objects within `--window` to see if using delta compression saves
85         space. `--depth` limits the maximum delta depth; making it too deep
86         affects the performance on the unpacker side, because delta data needs
87         to be applied that many times to get to the necessary object.
88         The default value for --window is 10 and --depth is 50.
90 --window-memory=[N]::
91         This option provides an additional limit on top of `--window`;
92         the window size will dynamically scale down so as to not take
93         up more than N bytes in memory.  This is useful in
94         repositories with a mix of large and small objects to not run
95         out of memory with a large window, but still be able to take
96         advantage of the large window for the smaller objects.  The
97         size can be suffixed with "k", "m", or "g".
98         `--window-memory=0` makes memory usage unlimited, which is the
99         default.
101 --max-pack-size=<n>::
102         Maximum size of each output packfile, expressed in MiB.
103         If specified,  multiple packfiles may be created.
104         The default is unlimited.
107 Configuration
108 -------------
110 When configuration variable `repack.UseDeltaBaseOffset` is set
111 for the repository, the command passes `--delta-base-offset`
112 option to 'git-pack-objects'; this typically results in slightly
113 smaller packs, but the generated packs are incompatible with
114 versions of git older than (and including) v1.4.3; do not set
115 the variable in a repository that older version of git needs to
116 be able to read (this includes repositories from which packs can
117 be copied out over http or rsync, and people who obtained packs
118 that way can try to use older git with it).
121 Author
122 ------
123 Written by Linus Torvalds <torvalds@osdl.org>
125 Documentation
126 --------------
127 Documentation by Ryan Anderson <ryan@michonline.com>
129 SEE ALSO
130 --------
131 linkgit:git-pack-objects[1]
132 linkgit:git-prune-packed[1]
136 Part of the linkgit:git[1] suite