Autogenerated HTML docs for v1.7.5.1-339-gb602ed
[git/jnareb-git.git] / git-pack-objects.html
blob26cd6691fcc6837d17d62c5a08bf1948dc409bde
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">
4 <head>
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">
9 /* Debug borders */
10 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
12 border: 1px solid red;
16 body {
17 margin: 1em 5% 1em 5%;
20 a {
21 color: blue;
22 text-decoration: underline;
24 a:visited {
25 color: fuchsia;
28 em {
29 font-style: italic;
30 color: navy;
33 strong {
34 font-weight: bold;
35 color: #083194;
38 tt {
39 color: navy;
42 h1, h2, h3, h4, h5, h6 {
43 color: #527bbd;
44 font-family: sans-serif;
45 margin-top: 1.2em;
46 margin-bottom: 0.5em;
47 line-height: 1.3;
50 h1, h2, h3 {
51 border-bottom: 2px solid silver;
53 h2 {
54 padding-top: 0.5em;
56 h3 {
57 float: left;
59 h3 + * {
60 clear: left;
63 div.sectionbody {
64 font-family: serif;
65 margin-left: 0;
68 hr {
69 border: 1px solid silver;
72 p {
73 margin-top: 0.5em;
74 margin-bottom: 0.5em;
77 ul, ol, li > p {
78 margin-top: 0;
81 pre {
82 padding: 0;
83 margin: 0;
86 span#author {
87 color: #527bbd;
88 font-family: sans-serif;
89 font-weight: bold;
90 font-size: 1.1em;
92 span#email {
94 span#revnumber, span#revdate, span#revremark {
95 font-family: sans-serif;
98 div#footer {
99 font-family: sans-serif;
100 font-size: small;
101 border-top: 2px solid silver;
102 padding-top: 0.5em;
103 margin-top: 4.0em;
105 div#footer-text {
106 float: left;
107 padding-bottom: 0.5em;
109 div#footer-badges {
110 float: right;
111 padding-bottom: 0.5em;
114 div#preamble {
115 margin-top: 1.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 {
121 margin-top: 1.5em;
122 margin-bottom: 1.5em;
124 div.admonitionblock {
125 margin-top: 2.5em;
126 margin-bottom: 2.5em;
129 div.content { /* Block element content. */
130 padding: 0;
133 /* Block element titles. */
134 div.title, caption.title {
135 color: #527bbd;
136 font-family: sans-serif;
137 font-weight: bold;
138 text-align: left;
139 margin-top: 1.0em;
140 margin-bottom: 0.5em;
142 div.title + * {
143 margin-top: 0;
146 td div.title:first-child {
147 margin-top: 0.0em;
149 div.content div.title:first-child {
150 margin-top: 0.0em;
152 div.content + div.title {
153 margin-top: 0.0em;
156 div.sidebarblock > div.content {
157 background: #ffffee;
158 border: 1px solid silver;
159 padding: 0.5em;
162 div.listingblock > div.content {
163 border: 1px solid silver;
164 background: #f4f4f4;
165 padding: 0.5em;
168 div.quoteblock {
169 padding-left: 2.0em;
170 margin-right: 10%;
172 div.quoteblock > div.attribution {
173 padding-top: 0.5em;
174 text-align: right;
177 div.verseblock {
178 padding-left: 2.0em;
179 margin-right: 10%;
181 div.verseblock > div.content {
182 white-space: pre;
184 div.verseblock > div.attribution {
185 padding-top: 0.75em;
186 text-align: left;
188 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
189 div.verseblock + div.attribution {
190 text-align: left;
193 div.admonitionblock .icon {
194 vertical-align: top;
195 font-size: 1.1em;
196 font-weight: bold;
197 text-decoration: underline;
198 color: #527bbd;
199 padding-right: 0.5em;
201 div.admonitionblock td.content {
202 padding-left: 0.5em;
203 border-left: 2px solid silver;
206 div.exampleblock > div.content {
207 border-left: 2px solid silver;
208 padding: 0.5em;
211 div.imageblock div.content { padding-left: 0; }
212 span.image img { border-style: none; }
213 a.image:visited { color: white; }
215 dl {
216 margin-top: 0.8em;
217 margin-bottom: 0.8em;
219 dt {
220 margin-top: 0.5em;
221 margin-bottom: 0;
222 font-style: normal;
223 color: navy;
225 dd > *:first-child {
226 margin-top: 0.1em;
229 ul, ol {
230 list-style-position: outside;
232 ol.arabic {
233 list-style-type: decimal;
235 ol.loweralpha {
236 list-style-type: lower-alpha;
238 ol.upperalpha {
239 list-style-type: upper-alpha;
241 ol.lowerroman {
242 list-style-type: lower-roman;
244 ol.upperroman {
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 {
251 margin-top: 0.1em;
252 margin-bottom: 0.1em;
255 div.tableblock > table {
256 border: 3px solid #527bbd;
258 thead {
259 font-family: sans-serif;
260 font-weight: bold;
262 tfoot {
263 font-weight: bold;
265 td > div.verse {
266 white-space: pre;
268 p.table {
269 margin-top: 0;
271 /* Because the table frame attribute is overriden by CSS in most browsers. */
272 div.tableblock > table[frame="void"] {
273 border-style: none;
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;
285 div.hdlist {
286 margin-top: 0.8em;
287 margin-bottom: 0.8em;
289 div.hdlist tr {
290 padding-bottom: 15px;
292 dt.hdlist1.strong, td.hdlist1.strong {
293 font-weight: bold;
295 td.hdlist1 {
296 vertical-align: top;
297 font-style: normal;
298 padding-right: 0.8em;
299 color: navy;
301 td.hdlist2 {
302 vertical-align: top;
304 div.hdlist.compact tr {
305 margin: 0;
306 padding-bottom: 0;
309 .comment {
310 background: yellow;
313 @media print {
314 div#footer-badges { display: none; }
317 div#toctitle {
318 color: #527bbd;
319 font-family: sans-serif;
320 font-size: 1.1em;
321 font-weight: bold;
322 margin-top: 1.0em;
323 margin-bottom: 0.1em;
326 div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
327 margin-top: 0;
328 margin-bottom: 0;
330 div.toclevel2 {
331 margin-left: 2em;
332 font-size: 0.9em;
334 div.toclevel3 {
335 margin-left: 4em;
336 font-size: 0.9em;
338 div.toclevel4 {
339 margin-left: 6em;
340 font-size: 0.9em;
342 /* Overrides for manpage documents */
343 h1 {
344 padding-top: 0.5em;
345 padding-bottom: 0.5em;
346 border-top: 2px solid silver;
347 border-bottom: 2px solid silver;
349 h2 {
350 border-style: none;
352 div.sectionbody {
353 margin-left: 5%;
356 @media print {
357 div#toc { display: none; }
360 /* Workarounds for IE6's broken and incomplete CSS2. */
362 div.sidebar-content {
363 background: #ffffee;
364 border: 1px solid silver;
365 padding: 0.5em;
367 div.sidebar-title, div.image-title {
368 color: #527bbd;
369 font-family: sans-serif;
370 font-weight: bold;
371 margin-top: 0.0em;
372 margin-bottom: 0.5em;
375 div.listingblock div.content {
376 border: 1px solid silver;
377 background: #f4f4f4;
378 padding: 0.5em;
381 div.quoteblock-attribution {
382 padding-top: 0.5em;
383 text-align: right;
386 div.verseblock-content {
387 white-space: pre;
389 div.verseblock-attribution {
390 padding-top: 0.75em;
391 text-align: left;
394 div.exampleblock-content {
395 border-left: 2px solid silver;
396 padding-left: 0.5em;
399 /* IE6 sets dynamically generated links as visited. */
400 div#toc a:visited { color: blue; }
401 </style>
402 </head>
403 <body>
404 <div id="header">
405 <h1>
406 git-pack-objects(1) Manual Page
407 </h1>
408 <h2>NAME</h2>
409 <div class="sectionbody">
410 <p>git-pack-objects -
411 Create a packed archive of objects
412 </p>
413 </div>
414 </div>
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=&lt;n&gt;] [--depth=&lt;n&gt;]
421 [--revs [--unpacked | --all]] [--stdout | base-name]
422 [--keep-true-parents] &lt; object-list</div>
423 <div class="verseblock-attribution">
424 </div></div>
425 </div>
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>
448 </div>
449 <h2 id="_options">OPTIONS</h2>
450 <div class="sectionbody">
451 <div class="dlist"><dl>
452 <dt class="hdlist1">
453 base-name
454 </dt>
455 <dd>
457 Write into a pair of files (.pack and .idx), using
458 &lt;base-name&gt; to determine the name of the created file.
459 When this option is used, the two files are written in
460 &lt;base-name&gt;-&lt;SHA1&gt;.{pack,idx} files. &lt;SHA1&gt; 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.
464 </p>
465 </dd>
466 <dt class="hdlist1">
467 --stdout
468 </dt>
469 <dd>
471 Write the pack contents (what would have been written to
472 .pack file) out to the standard output.
473 </p>
474 </dd>
475 <dt class="hdlist1">
476 --revs
477 </dt>
478 <dd>
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.
485 </p>
486 </dd>
487 <dt class="hdlist1">
488 --unpacked
489 </dt>
490 <dd>
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.
495 </p>
496 </dd>
497 <dt class="hdlist1">
498 --all
499 </dt>
500 <dd>
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
505 included.
506 </p>
507 </dd>
508 <dt class="hdlist1">
509 --include-tag
510 </dt>
511 <dd>
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.
516 </p>
517 </dd>
518 <dt class="hdlist1">
519 --window=&lt;n&gt;
520 </dt>
521 <dt class="hdlist1">
522 --depth=&lt;n&gt;
523 </dt>
524 <dd>
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.
536 </p>
537 </dd>
538 <dt class="hdlist1">
539 --window-memory=&lt;n&gt;
540 </dt>
541 <dd>
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>&lt;n&gt;</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
551 default.
552 </p>
553 </dd>
554 <dt class="hdlist1">
555 --max-pack-size=&lt;n&gt;
556 </dt>
557 <dd>
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.
564 </p>
565 </dd>
566 <dt class="hdlist1">
567 --honor-pack-keep
568 </dt>
569 <dd>
571 This flag causes an object already in a local pack that
572 has a .keep file to be ignored, even if it would have
573 otherwise been packed.
574 </p>
575 </dd>
576 <dt class="hdlist1">
577 --incremental
578 </dt>
579 <dd>
581 This flag causes an object already in a pack to be ignored
582 even if it would have otherwise been packed.
583 </p>
584 </dd>
585 <dt class="hdlist1">
586 --local
587 </dt>
588 <dd>
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
592 packed.
593 </p>
594 </dd>
595 <dt class="hdlist1">
596 --non-empty
597 </dt>
598 <dd>
600 Only create a packed archive if it would contain at
601 least one object.
602 </p>
603 </dd>
604 <dt class="hdlist1">
605 --progress
606 </dt>
607 <dd>
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.
613 </p>
614 </dd>
615 <dt class="hdlist1">
616 --all-progress
617 </dt>
618 <dd>
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
628 used.
629 </p>
630 </dd>
631 <dt class="hdlist1">
632 --all-progress-implied
633 </dt>
634 <dd>
636 This is used to imply --all-progress whenever progress display
637 is activated. Unlike --all-progress this flag doesn&#8217;t actually
638 force any progress display by itself.
639 </p>
640 </dd>
641 <dt class="hdlist1">
643 </dt>
644 <dd>
646 This flag makes the command not to report its progress
647 on the standard error stream.
648 </p>
649 </dd>
650 <dt class="hdlist1">
651 --no-reuse-delta
652 </dt>
653 <dd>
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.
660 </p>
661 </dd>
662 <dt class="hdlist1">
663 --no-reuse-object
664 </dt>
665 <dd>
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.
672 </p>
673 </dd>
674 <dt class="hdlist1">
675 --compression=&lt;n&gt;
676 </dt>
677 <dd>
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.
685 </p>
686 </dd>
687 <dt class="hdlist1">
688 --thin
689 </dt>
690 <dd>
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.
695 </p>
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>
700 </dd>
701 <dt class="hdlist1">
702 --delta-base-offset
703 </dt>
704 <dd>
706 A packed archive can express the base object of a delta as
707 either a 20-byte object name or as an offset in the
708 stream, but ancient versions of git don&#8217;t 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.
715 </p>
716 <div class="paragraph"><p>Note: Porcelain commands such as <tt>git gc</tt> (see <a href="git-gc.html">git-gc(1)</a>),
717 <tt>git repack</tt> (see <a href="git-repack.html">git-repack(1)</a>) pass this option by default
718 in modern git when they put objects in your repository into pack files.
719 So does <tt>git bundle</tt> (see <a href="git-bundle.html">git-bundle(1)</a>) when it creates a bundle.</p></div>
720 </dd>
721 <dt class="hdlist1">
722 --threads=&lt;n&gt;
723 </dt>
724 <dd>
726 Specifies the number of threads to spawn when searching for best
727 delta matches. This requires that pack-objects be compiled with
728 pthreads otherwise this option is ignored with a warning.
729 This is meant to reduce packing time on multiprocessor machines.
730 The required amount of memory for the delta search window is
731 however multiplied by the number of threads.
732 Specifying 0 will cause git to auto-detect the number of CPU&#8217;s
733 and set the number of threads accordingly.
734 </p>
735 </dd>
736 <dt class="hdlist1">
737 --index-version=&lt;version&gt;[,&lt;offset&gt;]
738 </dt>
739 <dd>
741 This is intended to be used by the test suite only. It allows
742 to force the version for the generated pack index, and to force
743 64-bit index entries on objects located above the given offset.
744 </p>
745 </dd>
746 <dt class="hdlist1">
747 --keep-true-parents
748 </dt>
749 <dd>
751 With this option, parents that are hidden by grafts are packed
752 nevertheless.
753 </p>
754 </dd>
755 </dl></div>
756 </div>
757 <h2 id="_see_also">SEE ALSO</h2>
758 <div class="sectionbody">
759 <div class="paragraph"><p><a href="git-rev-list.html">git-rev-list(1)</a>
760 <a href="git-repack.html">git-repack(1)</a>
761 <a href="git-prune-packed.html">git-prune-packed(1)</a></p></div>
762 </div>
763 <h2 id="_git">GIT</h2>
764 <div class="sectionbody">
765 <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
766 </div>
767 <div id="footer">
768 <div id="footer-text">
769 Last updated 2011-04-13 22:40:02 UTC
770 </div>
771 </div>
772 </body>
773 </html>