1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" />
6 <meta name=
"generator" content=
"AsciiDoc 8.4.5" />
7 <title>git-pack-objects(
1)
</title>
8 <style type=
"text/css">
10 p
, li
, dt
, dd
, div
, pre
, h1
, h2
, h3
, h4
, h5
, h6
{
12 border: 1px solid red;
17 margin: 1em 5% 1em 5%;
22 text-decoration: underline
;
42 h1
, h2
, h3
, h4
, h5
, h6
{
44 font-family: sans-serif
;
51 border-bottom: 2px solid silver
;
69 border: 1px solid silver
;
88 font-family: sans-serif
;
94 span#revnumber
, span#revdate
, span#revremark
{
95 font-family: sans-serif
;
99 font-family: sans-serif
;
101 border-top: 2px solid silver
;
107 padding-bottom: 0.5em;
111 padding-bottom: 0.5em;
116 margin-bottom: 1.5em;
118 div
.tableblock
, div
.imageblock
, div
.exampleblock
, div
.verseblock
,
119 div
.quoteblock
, div
.literalblock
, div
.listingblock
, div
.sidebarblock
,
120 div
.admonitionblock
{
122 margin-bottom: 1.5em;
124 div
.admonitionblock
{
126 margin-bottom: 2.5em;
129 div
.content
{ /* Block element content. */
133 /* Block element titles. */
134 div
.title
, caption
.title
{
136 font-family: sans-serif
;
140 margin-bottom: 0.5em;
146 td div
.title:first-child
{
149 div
.content div
.title:first-child
{
152 div
.content
+ div
.title
{
156 div
.sidebarblock
> div
.content
{
158 border: 1px solid silver
;
162 div
.listingblock
> div
.content
{
163 border: 1px solid silver
;
172 div
.quoteblock
> div
.attribution
{
181 div
.verseblock
> div
.content
{
184 div
.verseblock
> div
.attribution
{
188 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
189 div
.verseblock
+ div
.attribution
{
193 div
.admonitionblock
.icon
{
197 text-decoration: underline
;
199 padding-right: 0.5em;
201 div
.admonitionblock td
.content
{
203 border-left: 2px solid silver
;
206 div
.exampleblock
> div
.content
{
207 border-left: 2px solid silver
;
211 div
.imageblock div
.content
{ padding-left: 0; }
212 span
.image img
{ border-style: none
; }
213 a
.image:visited
{ color: white
; }
217 margin-bottom: 0.8em;
230 list-style-position: outside
;
233 list-style-type: decimal
;
236 list-style-type: lower-alpha
;
239 list-style-type: upper-alpha
;
242 list-style-type: lower-roman
;
245 list-style-type: upper-roman
;
248 div
.compact ul
, div
.compact ol
,
249 div
.compact p
, div
.compact p
,
250 div
.compact div
, div
.compact div
{
252 margin-bottom: 0.1em;
255 div
.tableblock
> table
{
256 border: 3px solid
#527bbd;
259 font-family: sans-serif
;
271 /* Because the table frame attribute is overriden by CSS in most browsers. */
272 div
.tableblock
> table
[frame
="void"] {
275 div
.tableblock
> table
[frame
="hsides"] {
276 border-left-style: none
;
277 border-right-style: none
;
279 div
.tableblock
> table
[frame
="vsides"] {
280 border-top-style: none
;
281 border-bottom-style: none
;
287 margin-bottom: 0.8em;
290 padding-bottom: 15px;
292 dt
.hdlist1
.strong
, td
.hdlist1
.strong
{
298 padding-right: 0.8em;
304 div
.hdlist
.compact tr
{
314 div#footer-badges
{ display: none
; }
319 font-family: sans-serif
;
323 margin-bottom: 0.1em;
326 div
.toclevel1
, div
.toclevel2
, div
.toclevel3
, div
.toclevel4
{
342 /* Overrides for manpage documents */
345 padding-bottom: 0.5em;
346 border-top: 2px solid silver
;
347 border-bottom: 2px solid silver
;
357 div#toc
{ display: none
; }
360 /* Workarounds for IE6's broken and incomplete CSS2. */
362 div
.sidebar-content
{
364 border: 1px solid silver
;
367 div
.sidebar-title
, div
.image-title
{
369 font-family: sans-serif
;
372 margin-bottom: 0.5em;
375 div
.listingblock div
.content
{
376 border: 1px solid silver
;
381 div
.quoteblock-attribution
{
386 div
.verseblock-content
{
389 div
.verseblock-attribution
{
394 div
.exampleblock-content
{
395 border-left: 2px solid silver
;
399 /* IE6 sets dynamically generated links as visited. */
400 div#toc
a:visited
{ color: blue
; }
406 git-pack-objects(
1) Manual Page
409 <div class=
"sectionbody">
410 <p>git-pack-objects -
411 Create a packed archive of objects
415 <h2 id=
"_synopsis">SYNOPSIS
</h2>
416 <div class=
"sectionbody">
417 <div class=
"verseblock">
418 <div class=
"verseblock-content"><em>git pack-objects
</em> [-q | --progress | --all-progress] [--all-progress-implied]
419 [--no-reuse-delta] [--delta-base-offset] [--non-empty]
420 [--local] [--incremental] [--window=
<n
>] [--depth=
<n
>]
421 [--revs [--unpacked | --all]] [--stdout | base-name]
422 [--keep-true-parents]
< object-list
</div>
423 <div class=
"verseblock-attribution">
426 <h2 id=
"_description">DESCRIPTION
</h2>
427 <div class=
"sectionbody">
428 <div class=
"paragraph"><p>Reads list of objects from the standard input, and writes a packed
429 archive with specified base-name, or to the standard output.
</p></div>
430 <div class=
"paragraph"><p>A packed archive is an efficient way to transfer a set of objects
431 between two repositories as well as an access efficient archival
432 format. In a packed archive, an object is either stored as a
433 compressed whole or as a difference from some other object.
434 The latter is often called a delta.
</p></div>
435 <div class=
"paragraph"><p>The packed archive format (.pack) is designed to be self-contained
436 so that it can be unpacked without any further information. Therefore,
437 each object that a delta depends upon must be present within the pack.
</p></div>
438 <div class=
"paragraph"><p>A pack index file (.idx) is generated for fast, random access to the
439 objects in the pack. Placing both the index file (.idx) and the packed
440 archive (.pack) in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or
441 any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES)
442 enables git to read from the pack archive.
</p></div>
443 <div class=
"paragraph"><p>The
<em>git unpack-objects
</em> command can read the packed archive and
444 expand the objects contained in the pack into
"one-file
445 one-object" format; this is typically done by the smart-pull
446 commands when a pack is created on-the-fly for efficient network
447 transport by their peers.
</p></div>
449 <h2 id=
"_options">OPTIONS
</h2>
450 <div class=
"sectionbody">
451 <div class=
"dlist"><dl>
457 Write into a pair of files (.pack and .idx), using
458 <base-name
> to determine the name of the created file.
459 When this option is used, the two files are written in
460 <base-name
>-
<SHA1
>.{pack,idx} files.
<SHA1
> is a hash
461 of the sorted object names to make the resulting filename
462 based on the pack content, and written to the standard
463 output of the command.
471 Write the pack contents (what would have been written to
472 .pack file) out to the standard output.
480 Read the revision arguments from the standard input, instead of
481 individual object names. The revision arguments are processed
482 the same way as
<em>git rev-list
</em> with the
<tt>--objects
</tt> flag
483 uses its
<tt>commit
</tt> arguments to build the list of objects it
484 outputs. The objects on the resulting list are packed.
492 This implies
<tt>--revs
</tt>. When processing the list of
493 revision arguments read from the standard input, limit
494 the objects packed to those that are not already packed.
502 This implies
<tt>--revs
</tt>. In addition to the list of
503 revision arguments read from the standard input, pretend
504 as if all refs under
<tt>refs/
</tt> are specified to be
513 Include unasked-for annotated tags if the object they
514 reference was included in the resulting packfile. This
515 can be useful to send new tags to native git clients.
526 These two options affect how the objects contained in
527 the pack are stored using delta compression. The
528 objects are first internally sorted by type, size and
529 optionally names and compared against the other objects
530 within --window to see if using delta compression saves
531 space. --depth limits the maximum delta depth; making
532 it too deep affects the performance on the unpacker
533 side, because delta data needs to be applied that many
534 times to get to the necessary object.
535 The default value for --window is
10 and --depth is
50.
539 --window-memory=
<n
>
543 This option provides an additional limit on top of
<tt>--window
</tt>;
544 the window size will dynamically scale down so as to not take
545 up more than
<em><n
></em> bytes in memory. This is useful in
546 repositories with a mix of large and small objects to not run
547 out of memory with a large window, but still be able to take
548 advantage of the large window for the smaller objects. The
549 size can be suffixed with
"k",
"m", or
"g".
550 <tt>--window-memory=
0</tt> makes memory usage unlimited, which is the
555 --max-pack-size=
<n
>
559 Maximum size of each output pack file. The size can be suffixed with
560 "k",
"m", or
"g". The minimum size allowed is limited to
1 MiB.
561 If specified, multiple packfiles may be created.
562 The default is unlimited, unless the config variable
563 <tt>pack.packSizeLimit
</tt> is set.
571 This flag causes an object already in a local pack that
572 has a .keep file to be ignored, even if it it would have
573 otherwise been packed.
581 This flag causes an object already in a pack to be ignored
582 even if it would have otherwise been packed.
590 This flag causes an object that is borrowed from an alternate
591 object store to be ignored even if it would have otherwise been
600 Only create a packed archive if it would contain at
609 Progress status is reported on the standard error stream
610 by default when it is attached to a terminal, unless -q
611 is specified. This flag forces progress status even if
612 the standard error stream is not directed to a terminal.
620 When --stdout is specified then progress report is
621 displayed during the object count and compression phases
622 but inhibited during the write-out phase. The reason is
623 that in some cases the output stream is directly linked
624 to another command which may wish to display progress
625 status of its own as it processes incoming pack data.
626 This flag is like --progress except that it forces progress
627 report for the write-out phase as well even if --stdout is
632 --all-progress-implied
636 This is used to imply --all-progress whenever progress display
637 is activated. Unlike --all-progress this flag doesn
’t actually
638 force any progress display by itself.
646 This flag makes the command not to report its progress
647 on the standard error stream.
655 When creating a packed archive in a repository that
656 has existing packs, the command reuses existing deltas.
657 This sometimes results in a slightly suboptimal pack.
658 This flag tells the command not to reuse existing deltas
659 but compute them from scratch.
667 This flag tells the command not to reuse existing object data at all,
668 including non deltified object, forcing recompression of everything.
669 This implies --no-reuse-delta. Useful only in the obscure case where
670 wholesale enforcement of a different compression level on the
671 packed data is desired.
675 --compression=
<n
>
679 Specifies compression level for newly-compressed data in the
680 generated pack. If not specified, pack compression level is
681 determined first by pack.compression, then by core.compression,
682 and defaults to -
1, the zlib default, if neither is set.
683 Add --no-reuse-object if you want to force a uniform compression
684 level on all data no matter the source.
692 Create a
"thin" pack by omitting the common objects between a
693 sender and a receiver in order to reduce network transfer. This
694 option only makes sense in conjunction with --stdout.
696 <div class=
"paragraph"><p>Note: A thin pack violates the packed archive format by omitting
697 required objects and is thus unusable by git without making it
698 self-contained. Use
<tt>git index-pack --fix-thin
</tt>
699 (see
<a href=
"git-index-pack.html">git-index-pack(
1)
</a>) to restore the self-contained property.
</p></div>
706 A packed archive can express base object of a delta as
707 either
20-byte object name or as an offset in the
708 stream, but older version of git does not understand the
709 latter. By default,
<em>git pack-objects
</em> only uses the
710 former format for better compatibility. This option
711 allows the command to use the latter format for
712 compactness. Depending on the average delta chain
713 length, this option typically shrinks the resulting
714 packfile by
3-
5 per-cent.
722 Specifies the number of threads to spawn when searching for best
723 delta matches. This requires that pack-objects be compiled with
724 pthreads otherwise this option is ignored with a warning.
725 This is meant to reduce packing time on multiprocessor machines.
726 The required amount of memory for the delta search window is
727 however multiplied by the number of threads.
728 Specifying
0 will cause git to auto-detect the number of CPU
’s
729 and set the number of threads accordingly.
733 --index-version=
<version
>[,
<offset
>]
737 This is intended to be used by the test suite only. It allows
738 to force the version for the generated pack index, and to force
739 64-bit index entries on objects located above the given offset.
747 With this option, parents that are hidden by grafts are packed
753 <h2 id=
"_author">Author
</h2>
754 <div class=
"sectionbody">
755 <div class=
"paragraph"><p>Written by Linus Torvalds
<<a href=
"mailto:torvalds@osdl.org">torvalds@osdl.org
</a>></p></div>
757 <h2 id=
"_documentation">Documentation
</h2>
758 <div class=
"sectionbody">
759 <div class=
"paragraph"><p>Documentation by Junio C Hamano
</p></div>
761 <h2 id=
"_see_also">SEE ALSO
</h2>
762 <div class=
"sectionbody">
763 <div class=
"paragraph"><p><a href=
"git-rev-list.html">git-rev-list(
1)
</a>
764 <a href=
"git-repack.html">git-repack(
1)
</a>
765 <a href=
"git-prune-packed.html">git-prune-packed(
1)
</a></p></div>
767 <h2 id=
"_git">GIT
</h2>
768 <div class=
"sectionbody">
769 <div class=
"paragraph"><p>Part of the
<a href=
"git.html">git(
1)
</a> suite
</p></div>
772 <div id=
"footer-text">
773 Last updated
2010-
11-
06 00:
41:
57 UTC