Code

Merge branch 'maint'
[git.git] / Documentation / git-pack-objects.txt
index bd3ee456e336add5d880d6a1192646220e7c34d7..5237ab0c046cb3b8468166684b04c9ef8d50e588 100644 (file)
@@ -25,16 +25,16 @@ is efficient to access.  The packed archive format (.pack) is
 designed to be unpackable without having anything else, but for
 random access, accompanied with the pack index file (.idx).
 
 designed to be unpackable without having anything else, but for
 random access, accompanied with the pack index file (.idx).
 
+Placing both in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or
+any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES)
+enables git to read from such an archive.
+
 'git-unpack-objects' command can read the packed archive and
 expand the objects contained in the pack into "one-file
 one-object" format; this is typically done by the smart-pull
 commands when a pack is created on-the-fly for efficient network
 transport by their peers.
 
 'git-unpack-objects' command can read the packed archive and
 expand the objects contained in the pack into "one-file
 one-object" format; this is typically done by the smart-pull
 commands when a pack is created on-the-fly for efficient network
 transport by their peers.
 
-Placing both in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or
-any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES)
-enables git to read from such an archive.
-
 In a packed archive, an object is either stored as a compressed
 whole, or as a difference from some other object.  The latter is
 often called a delta.
 In a packed archive, an object is either stored as a compressed
 whole, or as a difference from some other object.  The latter is
 often called a delta.
@@ -85,6 +85,22 @@ base-name::
        times to get to the necessary object.
        The default value for --window is 10 and --depth is 50.
 
        times to get to the necessary object.
        The default value for --window is 10 and --depth is 50.
 
+--window-memory=[N]::
+       This option provides an additional limit on top of `--window`;
+       the window size will dynamically scale down so as to not take
+       up more than N bytes in memory.  This is useful in
+       repositories with a mix of large and small objects to not run
+       out of memory with a large window, but still be able to take
+       advantage of the large window for the smaller objects.  The
+       size can be suffixed with "k", "m", or "g".
+       `--window-memory=0` makes memory usage unlimited, which is the
+       default.
+
+--max-pack-size=<n>::
+       Maximum size of each output packfile, expressed in MiB.
+       If specified,  multiple packfiles may be created.
+       The default is unlimited.
+
 --incremental::
        This flag causes an object already in a pack ignored
        even if it appears in the standard input.
 --incremental::
        This flag causes an object already in a pack ignored
        even if it appears in the standard input.
@@ -127,6 +143,21 @@ base-name::
        This flag tells the command not to reuse existing deltas
        but compute them from scratch.
 
        This flag tells the command not to reuse existing deltas
        but compute them from scratch.
 
+--no-reuse-object::
+       This flag tells the command not to reuse existing object data at all,
+       including non deltified object, forcing recompression of everything.
+       This implies --no-reuse-delta. Useful only in the obscure case where
+       wholesale enforcement of a different compression level on the
+       packed data is desired.
+
+--compression=[N]::
+       Specifies compression level for newly-compressed data in the
+       generated pack.  If not specified,  pack compression level is
+       determined first by pack.compression,  then by core.compression,
+       and defaults to -1,  the zlib default,  if neither is set.
+       Add \--no-reuse-object if you want to force a uniform compression
+       level on all data no matter the source.
+
 --delta-base-offset::
        A packed archive can express base object of a delta as
        either 20-byte object name or as an offset in the
 --delta-base-offset::
        A packed archive can express base object of a delta as
        either 20-byte object name or as an offset in the
@@ -138,6 +169,14 @@ base-name::
        length, this option typically shrinks the resulting
        packfile by 3-5 per-cent.
 
        length, this option typically shrinks the resulting
        packfile by 3-5 per-cent.
 
+--threads=<n>::
+       Specifies the number of threads to spawn when searching for best
+       delta matches.  This requires that pack-objects be compiled with
+       pthreads otherwise this option is ignored with a warning.
+       This is meant to reduce packing time on multiprocessor machines.
+       The required amount of memory for the delta search window is
+       however multiplied by the number of threads.
+
 --index-version=<version>[,<offset>]::
        This is intended to be used by the test suite only. It allows
        to force the version for the generated pack index, and to force
 --index-version=<version>[,<offset>]::
        This is intended to be used by the test suite only. It allows
        to force the version for the generated pack index, and to force
@@ -161,4 +200,3 @@ gitlink:git-prune-packed[1]
 GIT
 ---
 Part of the gitlink:git[7] suite
 GIT
 ---
 Part of the gitlink:git[7] suite
-