Autogenerated HTML docs for v1.6.6-35-g1d85d
[git/jnareb-git.git] / git-pack-objects.html
blobe6e9e773f19f4b8624115f0a84469f52f10206ee
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.2.5" />
7 <style type="text/css">
8 /* Debug borders */
9 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
11 border: 1px solid red;
15 body {
16 margin: 1em 5% 1em 5%;
19 a {
20 color: blue;
21 text-decoration: underline;
23 a:visited {
24 color: fuchsia;
27 em {
28 font-style: italic;
31 strong {
32 font-weight: bold;
35 tt {
36 color: navy;
39 h1, h2, h3, h4, h5, h6 {
40 color: #527bbd;
41 font-family: sans-serif;
42 margin-top: 1.2em;
43 margin-bottom: 0.5em;
44 line-height: 1.3;
47 h1, h2, h3 {
48 border-bottom: 2px solid silver;
50 h2 {
51 padding-top: 0.5em;
53 h3 {
54 float: left;
56 h3 + * {
57 clear: left;
60 div.sectionbody {
61 font-family: serif;
62 margin-left: 0;
65 hr {
66 border: 1px solid silver;
69 p {
70 margin-top: 0.5em;
71 margin-bottom: 0.5em;
74 pre {
75 padding: 0;
76 margin: 0;
79 span#author {
80 color: #527bbd;
81 font-family: sans-serif;
82 font-weight: bold;
83 font-size: 1.1em;
85 span#email {
87 span#revision {
88 font-family: sans-serif;
91 div#footer {
92 font-family: sans-serif;
93 font-size: small;
94 border-top: 2px solid silver;
95 padding-top: 0.5em;
96 margin-top: 4.0em;
98 div#footer-text {
99 float: left;
100 padding-bottom: 0.5em;
102 div#footer-badges {
103 float: right;
104 padding-bottom: 0.5em;
107 div#preamble,
108 div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
109 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
110 div.admonitionblock {
111 margin-right: 10%;
112 margin-top: 1.5em;
113 margin-bottom: 1.5em;
115 div.admonitionblock {
116 margin-top: 2.5em;
117 margin-bottom: 2.5em;
120 div.content { /* Block element content. */
121 padding: 0;
124 /* Block element titles. */
125 div.title, caption.title {
126 font-family: sans-serif;
127 font-weight: bold;
128 text-align: left;
129 margin-top: 1.0em;
130 margin-bottom: 0.5em;
132 div.title + * {
133 margin-top: 0;
136 td div.title:first-child {
137 margin-top: 0.0em;
139 div.content div.title:first-child {
140 margin-top: 0.0em;
142 div.content + div.title {
143 margin-top: 0.0em;
146 div.sidebarblock > div.content {
147 background: #ffffee;
148 border: 1px solid silver;
149 padding: 0.5em;
152 div.listingblock {
153 margin-right: 0%;
155 div.listingblock > div.content {
156 border: 1px solid silver;
157 background: #f4f4f4;
158 padding: 0.5em;
161 div.quoteblock > div.content {
162 padding-left: 2.0em;
165 div.attribution {
166 text-align: right;
168 div.verseblock + div.attribution {
169 text-align: left;
172 div.admonitionblock .icon {
173 vertical-align: top;
174 font-size: 1.1em;
175 font-weight: bold;
176 text-decoration: underline;
177 color: #527bbd;
178 padding-right: 0.5em;
180 div.admonitionblock td.content {
181 padding-left: 0.5em;
182 border-left: 2px solid silver;
185 div.exampleblock > div.content {
186 border-left: 2px solid silver;
187 padding: 0.5em;
190 div.verseblock div.content {
191 white-space: pre;
194 div.imageblock div.content { padding-left: 0; }
195 div.imageblock img { border: 1px solid silver; }
196 span.image img { border-style: none; }
198 dl {
199 margin-top: 0.8em;
200 margin-bottom: 0.8em;
202 dt {
203 margin-top: 0.5em;
204 margin-bottom: 0;
205 font-style: italic;
207 dd > *:first-child {
208 margin-top: 0;
211 ul, ol {
212 list-style-position: outside;
214 div.olist2 ol {
215 list-style-type: lower-alpha;
218 div.tableblock > table {
219 border: 3px solid #527bbd;
221 thead {
222 font-family: sans-serif;
223 font-weight: bold;
225 tfoot {
226 font-weight: bold;
229 div.hlist {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
233 div.hlist td {
234 padding-bottom: 5px;
236 td.hlist1 {
237 vertical-align: top;
238 font-style: italic;
239 padding-right: 0.8em;
241 td.hlist2 {
242 vertical-align: top;
245 @media print {
246 div#footer-badges { display: none; }
249 div#toctitle {
250 color: #527bbd;
251 font-family: sans-serif;
252 font-size: 1.1em;
253 font-weight: bold;
254 margin-top: 1.0em;
255 margin-bottom: 0.1em;
258 div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
259 margin-top: 0;
260 margin-bottom: 0;
262 div.toclevel2 {
263 margin-left: 2em;
264 font-size: 0.9em;
266 div.toclevel3 {
267 margin-left: 4em;
268 font-size: 0.9em;
270 div.toclevel4 {
271 margin-left: 6em;
272 font-size: 0.9em;
274 include1::./stylesheets/xhtml11-manpage.css[]
275 /* Workarounds for IE6's broken and incomplete CSS2. */
277 div.sidebar-content {
278 background: #ffffee;
279 border: 1px solid silver;
280 padding: 0.5em;
282 div.sidebar-title, div.image-title {
283 font-family: sans-serif;
284 font-weight: bold;
285 margin-top: 0.0em;
286 margin-bottom: 0.5em;
289 div.listingblock div.content {
290 border: 1px solid silver;
291 background: #f4f4f4;
292 padding: 0.5em;
295 div.quoteblock-content {
296 padding-left: 2.0em;
299 div.exampleblock-content {
300 border-left: 2px solid silver;
301 padding-left: 0.5em;
304 /* IE6 sets dynamically generated links as visited. */
305 div#toc a:visited { color: blue; }
306 </style>
307 <title>git-pack-objects(1)</title>
308 </head>
309 <body>
310 <div id="header">
311 <h1>
312 git-pack-objects(1) Manual Page
313 </h1>
314 <h2>NAME</h2>
315 <div class="sectionbody">
316 <p>git-pack-objects -
317 Create a packed archive of objects
318 </p>
319 </div>
320 </div>
321 <h2>SYNOPSIS</h2>
322 <div class="sectionbody">
323 <div class="verseblock">
324 <div class="content"><em>git pack-objects</em> [-q | --progress | --all-progress] [--all-progress-implied]
325 [--no-reuse-delta] [--delta-base-offset] [--non-empty]
326 [--local] [--incremental] [--window=N] [--depth=N]
327 [--revs [--unpacked | --all]*] [--stdout | base-name]
328 [--keep-true-parents] &lt; object-list</div></div>
329 </div>
330 <h2 id="_description">DESCRIPTION</h2>
331 <div class="sectionbody">
332 <div class="para"><p>Reads list of objects from the standard input, and writes a packed
333 archive with specified base-name, or to the standard output.</p></div>
334 <div class="para"><p>A packed archive is an efficient way to transfer set of objects
335 between two repositories, and also is an archival format which
336 is efficient to access. The packed archive format (.pack) is
337 designed to be self contained so that it can be unpacked without
338 any further information, but for fast, random access to the objects
339 in the pack, a pack index file (.idx) will be generated.</p></div>
340 <div class="para"><p>Placing both in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or
341 any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES)
342 enables git to read from such an archive.</p></div>
343 <div class="para"><p>The <em>git-unpack-objects</em> command can read the packed archive and
344 expand the objects contained in the pack into "one-file
345 one-object" format; this is typically done by the smart-pull
346 commands when a pack is created on-the-fly for efficient network
347 transport by their peers.</p></div>
348 <div class="para"><p>In a packed archive, an object is either stored as a compressed
349 whole, or as a difference from some other object. The latter is
350 often called a delta.</p></div>
351 </div>
352 <h2 id="_options">OPTIONS</h2>
353 <div class="sectionbody">
354 <div class="vlist"><dl>
355 <dt>
356 base-name
357 </dt>
358 <dd>
360 Write into a pair of files (.pack and .idx), using
361 &lt;base-name&gt; to determine the name of the created file.
362 When this option is used, the two files are written in
363 &lt;base-name&gt;-&lt;SHA1&gt;.{pack,idx} files. &lt;SHA1&gt; is a hash
364 of the sorted object names to make the resulting filename
365 based on the pack content, and written to the standard
366 output of the command.
367 </p>
368 </dd>
369 <dt>
370 --stdout
371 </dt>
372 <dd>
374 Write the pack contents (what would have been written to
375 .pack file) out to the standard output.
376 </p>
377 </dd>
378 <dt>
379 --revs
380 </dt>
381 <dd>
383 Read the revision arguments from the standard input, instead of
384 individual object names. The revision arguments are processed
385 the same way as <em>git-rev-list</em> with the <tt>--objects</tt> flag
386 uses its <tt>commit</tt> arguments to build the list of objects it
387 outputs. The objects on the resulting list are packed.
388 </p>
389 </dd>
390 <dt>
391 --unpacked
392 </dt>
393 <dd>
395 This implies <tt>--revs</tt>. When processing the list of
396 revision arguments read from the standard input, limit
397 the objects packed to those that are not already packed.
398 </p>
399 </dd>
400 <dt>
401 --all
402 </dt>
403 <dd>
405 This implies <tt>--revs</tt>. In addition to the list of
406 revision arguments read from the standard input, pretend
407 as if all refs under <tt>$GIT_DIR/refs</tt> are specified to be
408 included.
409 </p>
410 </dd>
411 <dt>
412 --include-tag
413 </dt>
414 <dd>
416 Include unasked-for annotated tags if the object they
417 reference was included in the resulting packfile. This
418 can be useful to send new tags to native git clients.
419 </p>
420 </dd>
421 <dt>
422 --window=[N]
423 </dt>
424 <dt>
425 --depth=[N]
426 </dt>
427 <dd>
429 These two options affect how the objects contained in
430 the pack are stored using delta compression. The
431 objects are first internally sorted by type, size and
432 optionally names and compared against the other objects
433 within --window to see if using delta compression saves
434 space. --depth limits the maximum delta depth; making
435 it too deep affects the performance on the unpacker
436 side, because delta data needs to be applied that many
437 times to get to the necessary object.
438 The default value for --window is 10 and --depth is 50.
439 </p>
440 </dd>
441 <dt>
442 --window-memory=[N]
443 </dt>
444 <dd>
446 This option provides an additional limit on top of <tt>--window</tt>;
447 the window size will dynamically scale down so as to not take
448 up more than N bytes in memory. This is useful in
449 repositories with a mix of large and small objects to not run
450 out of memory with a large window, but still be able to take
451 advantage of the large window for the smaller objects. The
452 size can be suffixed with "k", "m", or "g".
453 <tt>--window-memory=0</tt> makes memory usage unlimited, which is the
454 default.
455 </p>
456 </dd>
457 <dt>
458 --max-pack-size=&lt;n&gt;
459 </dt>
460 <dd>
462 Maximum size of each output packfile, expressed in MiB.
463 If specified, multiple packfiles may be created.
464 The default is unlimited, unless the config variable
465 <tt>pack.packSizeLimit</tt> is set.
466 </p>
467 </dd>
468 <dt>
469 --honor-pack-keep
470 </dt>
471 <dd>
473 This flag causes an object already in a local pack that
474 has a .keep file to be ignored, even if it appears in the
475 standard input.
476 </p>
477 </dd>
478 <dt>
479 --incremental
480 </dt>
481 <dd>
483 This flag causes an object already in a pack ignored
484 even if it appears in the standard input.
485 </p>
486 </dd>
487 <dt>
488 --local
489 </dt>
490 <dd>
492 This flag is similar to <tt>--incremental</tt>; instead of
493 ignoring all packed objects, it only ignores objects
494 that are packed and/or not in the local object store
495 (i.e. borrowed from an alternate).
496 </p>
497 </dd>
498 <dt>
499 --non-empty
500 </dt>
501 <dd>
503 Only create a packed archive if it would contain at
504 least one object.
505 </p>
506 </dd>
507 <dt>
508 --progress
509 </dt>
510 <dd>
512 Progress status is reported on the standard error stream
513 by default when it is attached to a terminal, unless -q
514 is specified. This flag forces progress status even if
515 the standard error stream is not directed to a terminal.
516 </p>
517 </dd>
518 <dt>
519 --all-progress
520 </dt>
521 <dd>
523 When --stdout is specified then progress report is
524 displayed during the object count and compression phases
525 but inhibited during the write-out phase. The reason is
526 that in some cases the output stream is directly linked
527 to another command which may wish to display progress
528 status of its own as it processes incoming pack data.
529 This flag is like --progress except that it forces progress
530 report for the write-out phase as well even if --stdout is
531 used.
532 </p>
533 </dd>
534 <dt>
535 --all-progress-implied
536 </dt>
537 <dd>
539 This is used to imply --all-progress whenever progress display
540 is activated. Unlike --all-progress this flag doesn't actually
541 force any progress display by itself.
542 </p>
543 </dd>
544 <dt>
546 </dt>
547 <dd>
549 This flag makes the command not to report its progress
550 on the standard error stream.
551 </p>
552 </dd>
553 <dt>
554 --no-reuse-delta
555 </dt>
556 <dd>
558 When creating a packed archive in a repository that
559 has existing packs, the command reuses existing deltas.
560 This sometimes results in a slightly suboptimal pack.
561 This flag tells the command not to reuse existing deltas
562 but compute them from scratch.
563 </p>
564 </dd>
565 <dt>
566 --no-reuse-object
567 </dt>
568 <dd>
570 This flag tells the command not to reuse existing object data at all,
571 including non deltified object, forcing recompression of everything.
572 This implies --no-reuse-delta. Useful only in the obscure case where
573 wholesale enforcement of a different compression level on the
574 packed data is desired.
575 </p>
576 </dd>
577 <dt>
578 --compression=[N]
579 </dt>
580 <dd>
582 Specifies compression level for newly-compressed data in the
583 generated pack. If not specified, pack compression level is
584 determined first by pack.compression, then by core.compression,
585 and defaults to -1, the zlib default, if neither is set.
586 Add --no-reuse-object if you want to force a uniform compression
587 level on all data no matter the source.
588 </p>
589 </dd>
590 <dt>
591 --delta-base-offset
592 </dt>
593 <dd>
595 A packed archive can express base object of a delta as
596 either 20-byte object name or as an offset in the
597 stream, but older version of git does not understand the
598 latter. By default, <em>git-pack-objects</em> only uses the
599 former format for better compatibility. This option
600 allows the command to use the latter format for
601 compactness. Depending on the average delta chain
602 length, this option typically shrinks the resulting
603 packfile by 3-5 per-cent.
604 </p>
605 </dd>
606 <dt>
607 --threads=&lt;n&gt;
608 </dt>
609 <dd>
611 Specifies the number of threads to spawn when searching for best
612 delta matches. This requires that pack-objects be compiled with
613 pthreads otherwise this option is ignored with a warning.
614 This is meant to reduce packing time on multiprocessor machines.
615 The required amount of memory for the delta search window is
616 however multiplied by the number of threads.
617 Specifying 0 will cause git to auto-detect the number of CPU's
618 and set the number of threads accordingly.
619 </p>
620 </dd>
621 <dt>
622 --index-version=&lt;version&gt;[,&lt;offset&gt;]
623 </dt>
624 <dd>
626 This is intended to be used by the test suite only. It allows
627 to force the version for the generated pack index, and to force
628 64-bit index entries on objects located above the given offset.
629 </p>
630 </dd>
631 <dt>
632 --keep-true-parents
633 </dt>
634 <dd>
636 With this option, parents that are hidden by grafts are packed
637 nevertheless.
638 </p>
639 </dd>
640 </dl></div>
641 </div>
642 <h2 id="_author">Author</h2>
643 <div class="sectionbody">
644 <div class="para"><p>Written by Linus Torvalds &lt;torvalds@osdl.org&gt;</p></div>
645 </div>
646 <h2 id="_documentation">Documentation</h2>
647 <div class="sectionbody">
648 <div class="para"><p>Documentation by Junio C Hamano</p></div>
649 </div>
650 <h2 id="_see_also">SEE ALSO</h2>
651 <div class="sectionbody">
652 <div class="para"><p><a href="git-rev-list.html">git-rev-list(1)</a>
653 <a href="git-repack.html">git-repack(1)</a>
654 <a href="git-prune-packed.html">git-prune-packed(1)</a></p></div>
655 </div>
656 <h2 id="_git">GIT</h2>
657 <div class="sectionbody">
658 <div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
659 </div>
660 <div id="footer">
661 <div id="footer-text">
662 Last updated 2009-12-03 09:12:42 UTC
663 </div>
664 </div>
665 </body>
666 </html>