Makefile: add a target which will abort compilation with ancient shells
[git/dscho.git] / Documentation / git-repack.txt
blob38ac60947bc6c4cbfc8aae70a92f9163fefed442
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 and there is no need to worry
35         about people fetching via dumb protocols from it.  Use
36         with '-d'.  This will clean up the objects that `git prune`
37         leaves behind, but `git fsck --full` shows as
38         dangling.
40 -A::
41         Same as `-a`, but any unreachable objects in a previous
42         pack become loose, unpacked objects, instead of being
43         left in the old pack.  Unreachable objects are never
44         intentionally added to a pack, even when repacking.
45         When used with '-d', this option
46         prevents unreachable objects from being immediately
47         deleted by way of being left in the old pack and then
48         removed.  Instead, the loose unreachable objects
49         will be pruned according to normal expiry rules
50         with the next 'git-gc' invocation. See linkgit:git-gc[1].
52 -d::
53         After packing, if the newly created packs make some
54         existing packs redundant, remove the redundant packs.
55         Also run  'git-prune-packed' to remove redundant
56         loose object files.
58 -l::
59         Pass the `--local` option to 'git-pack-objects'. See
60         linkgit:git-pack-objects[1].
62 -f::
63         Pass the `--no-reuse-delta` option to 'git-pack-objects'. See
64         linkgit:git-pack-objects[1].
66 -q::
67         Pass the `-q` option to 'git-pack-objects'. See
68         linkgit:git-pack-objects[1].
70 -n::
71         Do not update the server information with
72         'git-update-server-info'.  This option skips
73         updating local catalog files needed to publish
74         this repository (or a direct copy of it)
75         over HTTP or FTP.  See linkgit:git-update-server-info[1].
77 --window=[N]::
78 --depth=[N]::
79         These two options affect how the objects contained in the pack are
80         stored using delta compression. The objects are first internally
81         sorted by type, size and optionally names and compared against the
82         other objects within `--window` to see if using delta compression saves
83         space. `--depth` limits the maximum delta depth; making it too deep
84         affects the performance on the unpacker side, because delta data needs
85         to be applied that many times to get to the necessary object.
86         The default value for --window is 10 and --depth is 50.
88 --window-memory=[N]::
89         This option provides an additional limit on top of `--window`;
90         the window size will dynamically scale down so as to not take
91         up more than N bytes in memory.  This is useful in
92         repositories with a mix of large and small objects to not run
93         out of memory with a large window, but still be able to take
94         advantage of the large window for the smaller objects.  The
95         size can be suffixed with "k", "m", or "g".
96         `--window-memory=0` makes memory usage unlimited, which is the
97         default.
99 --max-pack-size=<n>::
100         Maximum size of each output packfile, expressed in MiB.
101         If specified,  multiple packfiles may be created.
102         The default is unlimited.
105 Configuration
106 -------------
108 When configuration variable `repack.UseDeltaBaseOffset` is set
109 for the repository, the command passes `--delta-base-offset`
110 option to 'git-pack-objects'; this typically results in slightly
111 smaller packs, but the generated packs are incompatible with
112 versions of git older than (and including) v1.4.3; do not set
113 the variable in a repository that older version of git needs to
114 be able to read (this includes repositories from which packs can
115 be copied out over http or rsync, and people who obtained packs
116 that way can try to use older git with it).
119 Author
120 ------
121 Written by Linus Torvalds <torvalds@osdl.org>
123 Documentation
124 --------------
125 Documentation by Ryan Anderson <ryan@michonline.com>
127 SEE ALSO
128 --------
129 linkgit:git-pack-objects[1]
130 linkgit:git-prune-packed[1]
134 Part of the linkgit:git[1] suite