1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
\r
4 <sect2 lang="en" id="git-pack-objects(1)">
\r
5 <title>git-pack-objects(1)</title>
\r
7 <primary>git-pack-objects(1)</primary>
\r
9 <simplesect id="git-pack-objects(1)__name">
\r
11 <simpara>git-pack-objects - Create a packed archive of objects</simpara>
\r
13 <simplesect id="git-pack-objects(1)__synopsis">
\r
14 <title>SYNOPSIS</title>
\r
16 <literallayout><emphasis>git pack-objects</emphasis> [-q | --progress | --all-progress] [--all-progress-implied]
\r
17 [--no-reuse-delta] [--delta-base-offset] [--non-empty]
\r
18 [--local] [--incremental] [--window=<n>] [--depth=<n>]
\r
19 [--revs [--unpacked | --all]] [--stdout | base-name]
\r
20 [--keep-true-parents] < object-list</literallayout>
\r
23 <simplesect id="git-pack-objects(1)__description">
\r
24 <title>DESCRIPTION</title>
\r
25 <simpara>Reads list of objects from the standard input, and writes a packed
\r
26 archive with specified base-name, or to the standard output.</simpara>
\r
27 <simpara>A packed archive is an efficient way to transfer a set of objects
\r
28 between two repositories as well as an access efficient archival
\r
29 format. In a packed archive, an object is either stored as a
\r
30 compressed whole or as a difference from some other object.
\r
31 The latter is often called a delta.</simpara>
\r
32 <simpara>The packed archive format (.pack) is designed to be self-contained
\r
33 so that it can be unpacked without any further information. Therefore,
\r
34 each object that a delta depends upon must be present within the pack.</simpara>
\r
35 <simpara>A pack index file (.idx) is generated for fast, random access to the
\r
36 objects in the pack. Placing both the index file (.idx) and the packed
\r
37 archive (.pack) in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or
\r
38 any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES)
\r
39 enables git to read from the pack archive.</simpara>
\r
40 <simpara>The <emphasis>git unpack-objects</emphasis> command can read the packed archive and
\r
41 expand the objects contained in the pack into "one-file
\r
42 one-object" format; this is typically done by the smart-pull
\r
43 commands when a pack is created on-the-fly for efficient network
\r
44 transport by their peers.</simpara>
\r
46 <simplesect id="git-pack-objects(1)__options">
\r
47 <title>OPTIONS</title>
\r
55 Write into a pair of files (.pack and .idx), using
\r
56 <base-name> to determine the name of the created file.
\r
57 When this option is used, the two files are written in
\r
58 <base-name>-<SHA1>.{pack,idx} files. <SHA1> is a hash
\r
59 of the sorted object names to make the resulting filename
\r
60 based on the pack content, and written to the standard
\r
61 output of the command.
\r
71 Write the pack contents (what would have been written to
\r
72 .pack file) out to the standard output.
\r
82 Read the revision arguments from the standard input, instead of
\r
83 individual object names. The revision arguments are processed
\r
84 the same way as <emphasis>git rev-list</emphasis> with the <emphasis>--objects</emphasis> flag
\r
85 uses its <emphasis>commit</emphasis> arguments to build the list of objects it
\r
86 outputs. The objects on the resulting list are packed.
\r
96 This implies <emphasis>--revs</emphasis>. When processing the list of
\r
97 revision arguments read from the standard input, limit
\r
98 the objects packed to those that are not already packed.
\r
108 This implies <emphasis>--revs</emphasis>. In addition to the list of
\r
109 revision arguments read from the standard input, pretend
\r
110 as if all refs under <emphasis>refs/</emphasis> are specified to be
\r
121 Include unasked-for annotated tags if the object they
\r
122 reference was included in the resulting packfile. This
\r
123 can be useful to send new tags to native git clients.
\r
136 These two options affect how the objects contained in
\r
137 the pack are stored using delta compression. The
\r
138 objects are first internally sorted by type, size and
\r
139 optionally names and compared against the other objects
\r
140 within --window to see if using delta compression saves
\r
141 space. --depth limits the maximum delta depth; making
\r
142 it too deep affects the performance on the unpacker
\r
143 side, because delta data needs to be applied that many
\r
144 times to get to the necessary object.
\r
145 The default value for --window is 10 and --depth is 50.
\r
151 --window-memory=<n>
\r
155 This option provides an additional limit on top of <emphasis>--window</emphasis>;
\r
156 the window size will dynamically scale down so as to not take
\r
157 up more than <emphasis><n></emphasis> bytes in memory. This is useful in
\r
158 repositories with a mix of large and small objects to not run
\r
159 out of memory with a large window, but still be able to take
\r
160 advantage of the large window for the smaller objects. The
\r
161 size can be suffixed with "k", "m", or "g".
\r
162 <emphasis>--window-memory=0</emphasis> makes memory usage unlimited, which is the
\r
169 --max-pack-size=<n>
\r
173 Maximum size of each output pack file. The size can be suffixed with
\r
174 "k", "m", or "g". The minimum size allowed is limited to 1 MiB.
\r
175 If specified, multiple packfiles may be created.
\r
176 The default is unlimited, unless the config variable
\r
177 <emphasis>pack.packSizeLimit</emphasis> is set.
\r
187 This flag causes an object already in a local pack that
\r
188 has a .keep file to be ignored, even if it would have
\r
189 otherwise been packed.
\r
199 This flag causes an object already in a pack to be ignored
\r
200 even if it would have otherwise been packed.
\r
210 This flag causes an object that is borrowed from an alternate
\r
211 object store to be ignored even if it would have otherwise been
\r
222 Only create a packed archive if it would contain at
\r
233 Progress status is reported on the standard error stream
\r
234 by default when it is attached to a terminal, unless -q
\r
235 is specified. This flag forces progress status even if
\r
236 the standard error stream is not directed to a terminal.
\r
246 When --stdout is specified then progress report is
\r
247 displayed during the object count and compression phases
\r
248 but inhibited during the write-out phase. The reason is
\r
249 that in some cases the output stream is directly linked
\r
250 to another command which may wish to display progress
\r
251 status of its own as it processes incoming pack data.
\r
252 This flag is like --progress except that it forces progress
\r
253 report for the write-out phase as well even if --stdout is
\r
260 --all-progress-implied
\r
264 This is used to imply --all-progress whenever progress display
\r
265 is activated. Unlike --all-progress this flag doesn't actually
\r
266 force any progress display by itself.
\r
276 This flag makes the command not to report its progress
\r
277 on the standard error stream.
\r
287 When creating a packed archive in a repository that
\r
288 has existing packs, the command reuses existing deltas.
\r
289 This sometimes results in a slightly suboptimal pack.
\r
290 This flag tells the command not to reuse existing deltas
\r
291 but compute them from scratch.
\r
301 This flag tells the command not to reuse existing object data at all,
\r
302 including non deltified object, forcing recompression of everything.
\r
303 This implies --no-reuse-delta. Useful only in the obscure case where
\r
304 wholesale enforcement of a different compression level on the
\r
305 packed data is desired.
\r
311 --compression=<n>
\r
315 Specifies compression level for newly-compressed data in the
\r
316 generated pack. If not specified, pack compression level is
\r
317 determined first by pack.compression, then by core.compression,
\r
318 and defaults to -1, the zlib default, if neither is set.
\r
319 Add --no-reuse-object if you want to force a uniform compression
\r
320 level on all data no matter the source.
\r
330 Create a "thin" pack by omitting the common objects between a
\r
331 sender and a receiver in order to reduce network transfer. This
\r
332 option only makes sense in conjunction with --stdout.
\r
334 <simpara>Note: A thin pack violates the packed archive format by omitting
\r
335 required objects and is thus unusable by git without making it
\r
336 self-contained. Use <emphasis>git index-pack --fix-thin</emphasis>
\r
337 (see <xref linkend="git-index-pack(1)" />) to restore the self-contained property.</simpara>
\r
342 --delta-base-offset
\r
346 A packed archive can express the base object of a delta as
\r
347 either a 20-byte object name or as an offset in the
\r
348 stream, but ancient versions of git don't understand the
\r
349 latter. By default, <emphasis>git pack-objects</emphasis> only uses the
\r
350 former format for better compatibility. This option
\r
351 allows the command to use the latter format for
\r
352 compactness. Depending on the average delta chain
\r
353 length, this option typically shrinks the resulting
\r
354 packfile by 3-5 per-cent.
\r
356 <simpara>Note: Porcelain commands such as <emphasis>git gc</emphasis> (see <xref linkend="git-gc(1)" />),
\r
357 <emphasis>git repack</emphasis> (see <xref linkend="git-repack(1)" />) pass this option by default
\r
358 in modern git when they put objects in your repository into pack files.
\r
359 So does <emphasis>git bundle</emphasis> (see <xref linkend="git-bundle(1)" />) when it creates a bundle.</simpara>
\r
364 --threads=<n>
\r
368 Specifies the number of threads to spawn when searching for best
\r
369 delta matches. This requires that pack-objects be compiled with
\r
370 pthreads otherwise this option is ignored with a warning.
\r
371 This is meant to reduce packing time on multiprocessor machines.
\r
372 The required amount of memory for the delta search window is
\r
373 however multiplied by the number of threads.
\r
374 Specifying 0 will cause git to auto-detect the number of CPU's
\r
375 and set the number of threads accordingly.
\r
381 --index-version=<version>[,<offset>]
\r
385 This is intended to be used by the test suite only. It allows
\r
386 to force the version for the generated pack index, and to force
\r
387 64-bit index entries on objects located above the given offset.
\r
393 --keep-true-parents
\r
397 With this option, parents that are hidden by grafts are packed
\r
404 <simplesect id="git-pack-objects(1)__see_also">
\r
405 <title>SEE ALSO</title>
\r
406 <simpara><xref linkend="git-rev-list(1)" />
\r
407 <xref linkend="git-repack(1)" />
\r
408 <xref linkend="git-prune-packed(1)" /></simpara>
\r
410 <simplesect id="git-pack-objects(1)__git">
\r
412 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
\r