1git-pack-objects(1) 2=================== 3 4NAME 5---- 6git-pack-objects - Create a packed archive of objects 7 8 9SYNOPSIS 10-------- 11[verse] 12'git pack-objects' [-q] [--no-reuse-delta] [--delta-base-offset] [--non-empty] 13 [--local] [--incremental] [--window=N] [--depth=N] [--all-progress] 14 [--revs [--unpacked | --all]*] [--stdout | base-name] < object-list 15 16 17DESCRIPTION 18----------- 19Reads list of objects from the standard input, and writes a packed 20archive with specified base-name, or to the standard output. 21 22A packed archive is an efficient way to transfer set of objects 23between two repositories, and also is an archival format which 24is efficient to access. The packed archive format (.pack) is 25designed to be self contained so that it can be unpacked without 26any further information, but for fast, random access to the objects 27in the pack, a pack index file (.idx) will be generated. 28 29Placing both in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or 30any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES) 31enables git to read from such an archive. 32 33The 'git-unpack-objects' command can read the packed archive and 34expand the objects contained in the pack into "one-file 35one-object" format; this is typically done by the smart-pull 36commands when a pack is created on-the-fly for efficient network 37transport by their peers. 38 39In a packed archive, an object is either stored as a compressed 40whole, or as a difference from some other object. The latter is 41often called a delta. 42 43 44OPTIONS 45------- 46base-name:: 47 Write into a pair of files (.pack and .idx), using 48 <base-name> to determine the name of the created file. 49 When this option is used, the two files are written in 50 <base-name>-<SHA1>.{pack,idx} files. <SHA1> is a hash 51 of the sorted object names to make the resulting filename 52 based on the pack content, and written to the standard 53 output of the command. 54 55--stdout:: 56 Write the pack contents (what would have been written to 57 .pack file) out to the standard output. 58 59--revs:: 60 Read the revision arguments from the standard input, instead of 61 individual object names. The revision arguments are processed 62 the same way as 'git-rev-list' with the `--objects` flag 63 uses its `commit` arguments to build the list of objects it 64 outputs. The objects on the resulting list are packed. 65 66--unpacked:: 67 This implies `--revs`. When processing the list of 68 revision arguments read from the standard input, limit 69 the objects packed to those that are not already packed. 70 71--all:: 72 This implies `--revs`. In addition to the list of 73 revision arguments read from the standard input, pretend 74 as if all refs under `$GIT_DIR/refs` are specified to be 75 included. 76 77--include-tag:: 78 Include unasked-for annotated tags if the object they 79 reference was included in the resulting packfile. This 80 can be useful to send new tags to native git clients. 81 82--window=[N]:: 83--depth=[N]:: 84 These two options affect how the objects contained in 85 the pack are stored using delta compression. The 86 objects are first internally sorted by type, size and 87 optionally names and compared against the other objects 88 within --window to see if using delta compression saves 89 space. --depth limits the maximum delta depth; making 90 it too deep affects the performance on the unpacker 91 side, because delta data needs to be applied that many 92 times to get to the necessary object. 93 The default value for --window is 10 and --depth is 50. 94 95--window-memory=[N]:: 96 This option provides an additional limit on top of `--window`; 97 the window size will dynamically scale down so as to not take 98 up more than N bytes in memory. This is useful in 99 repositories with a mix of large and small objects to not run 100 out of memory with a large window, but still be able to take 101 advantage of the large window for the smaller objects. The 102 size can be suffixed with "k", "m", or "g". 103 `--window-memory=0` makes memory usage unlimited, which is the 104 default. 105 106--max-pack-size=<n>:: 107 Maximum size of each output packfile, expressed in MiB. 108 If specified, multiple packfiles may be created. 109 The default is unlimited, unless the config variable 110 `pack.packSizeLimit` is set. 111 112--incremental:: 113 This flag causes an object already in a pack ignored 114 even if it appears in the standard input. 115 116--local:: 117 This flag is similar to `--incremental`; instead of 118 ignoring all packed objects, it only ignores objects 119 that are packed and not in the local object store 120 (i.e. borrowed from an alternate). 121 122--non-empty:: 123 Only create a packed archive if it would contain at 124 least one object. 125 126--progress:: 127 Progress status is reported on the standard error stream 128 by default when it is attached to a terminal, unless -q 129 is specified. This flag forces progress status even if 130 the standard error stream is not directed to a terminal. 131 132--all-progress:: 133 When --stdout is specified then progress report is 134 displayed during the object count and deltification phases 135 but inhibited during the write-out phase. The reason is 136 that in some cases the output stream is directly linked 137 to another command which may wish to display progress 138 status of its own as it processes incoming pack data. 139 This flag is like --progress except that it forces progress 140 report for the write-out phase as well even if --stdout is 141 used. 142 143-q:: 144 This flag makes the command not to report its progress 145 on the standard error stream. 146 147--no-reuse-delta:: 148 When creating a packed archive in a repository that 149 has existing packs, the command reuses existing deltas. 150 This sometimes results in a slightly suboptimal pack. 151 This flag tells the command not to reuse existing deltas 152 but compute them from scratch. 153 154--no-reuse-object:: 155 This flag tells the command not to reuse existing object data at all, 156 including non deltified object, forcing recompression of everything. 157 This implies --no-reuse-delta. Useful only in the obscure case where 158 wholesale enforcement of a different compression level on the 159 packed data is desired. 160 161--compression=[N]:: 162 Specifies compression level for newly-compressed data in the 163 generated pack. If not specified, pack compression level is 164 determined first by pack.compression, then by core.compression, 165 and defaults to -1, the zlib default, if neither is set. 166 Add --no-reuse-object if you want to force a uniform compression 167 level on all data no matter the source. 168 169--delta-base-offset:: 170 A packed archive can express base object of a delta as 171 either 20-byte object name or as an offset in the 172 stream, but older version of git does not understand the 173 latter. By default, 'git-pack-objects' only uses the 174 former format for better compatibility. This option 175 allows the command to use the latter format for 176 compactness. Depending on the average delta chain 177 length, this option typically shrinks the resulting 178 packfile by 3-5 per-cent. 179 180--threads=<n>:: 181 Specifies the number of threads to spawn when searching for best 182 delta matches. This requires that pack-objects be compiled with 183 pthreads otherwise this option is ignored with a warning. 184 This is meant to reduce packing time on multiprocessor machines. 185 The required amount of memory for the delta search window is 186 however multiplied by the number of threads. 187 Specifying 0 will cause git to auto-detect the number of CPU's 188 and set the number of threads accordingly. 189 190--index-version=<version>[,<offset>]:: 191 This is intended to be used by the test suite only. It allows 192 to force the version for the generated pack index, and to force 193 64-bit index entries on objects located above the given offset. 194 195 196Author 197------ 198Written by Linus Torvalds <torvalds@osdl.org> 199 200Documentation 201------------- 202Documentation by Junio C Hamano 203 204SEE ALSO 205-------- 206linkgit:git-rev-list[1] 207linkgit:git-repack[1] 208linkgit:git-prune-packed[1] 209 210GIT 211--- 212Part of the linkgit:git[1] suite