]>
Commit | Line | Data |
---|---|---|
5f40520f JH |
1 | git-pack-objects(1) |
2 | =================== | |
5f40520f JH |
3 | |
4 | NAME | |
5 | ---- | |
6 | git-pack-objects - Create a packed archive of objects. | |
7 | ||
8 | ||
9 | SYNOPSIS | |
10 | -------- | |
63ae26f8 | 11 | 'git-pack-objects' [--non-empty] [--local] [--incremental] [--window=N] [--depth=N] {--stdout | base-name} < object-list |
5f40520f JH |
12 | |
13 | ||
14 | DESCRIPTION | |
15 | ----------- | |
16 | Reads list of objects from the standard input, and writes a packed | |
17 | archive with specified base-name, or to the standard output. | |
18 | ||
19 | A packed archive is an efficient way to transfer set of objects | |
20 | between two repositories, and also is an archival format which | |
21 | is efficient to access. The packed archive format (.pack) is | |
22 | designed to be unpackable without having anything else, but for | |
23 | random access, accompanied with the pack index file (.idx). | |
24 | ||
25 | 'git-unpack-objects' command can read the packed archive and | |
26 | expand the objects contained in the pack into "one-file | |
27 | one-object" format; this is typically done by the smart-pull | |
28 | commands when a pack is created on-the-fly for efficient network | |
29 | transport by their peers. | |
30 | ||
2c6e4771 | 31 | Placing both in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or |
5f40520f | 32 | any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES) |
72e9340c | 33 | enables git to read from such an archive. |
5f40520f JH |
34 | |
35 | ||
36 | OPTIONS | |
37 | ------- | |
38 | base-name:: | |
39 | Write into a pair of files (.pack and .idx), using | |
40 | <base-name> to determine the name of the created file. | |
41 | When this option is used, the two files are written in | |
42 | <base-name>-<SHA1>.{pack,idx} files. <SHA1> is a hash | |
43 | of object names (currently in random order so it does | |
44 | not have any useful meaning) to make the resulting | |
45 | filename reasonably unique, and written to the standard | |
46 | output of the command. | |
47 | ||
48 | --stdout:: | |
49 | Write the pack contents (what would have been writtin to | |
50 | .pack file) out to the standard output. | |
51 | ||
52 | --window and --depth:: | |
53 | These two options affects how the objects contained in | |
54 | the pack are stored using delta compression. The | |
55 | objects are first internally sorted by type, size and | |
56 | optionally names and compared against the other objects | |
57 | within --window to see if using delta compression saves | |
58 | space. --depth limits the maximum delta depth; making | |
59 | it too deep affects the performance on the unpacker | |
60 | side, because delta data needs to be applied that many | |
61 | times to get to the necessary object. | |
62 | ||
63 | --incremental:: | |
64 | This flag causes an object already in a pack ignored | |
65 | even if it appears in the standard input. | |
66 | ||
12ea5bea JH |
67 | --local:: |
68 | This flag is similar to `--incremental`; instead of | |
69 | ignoring all packed objects, it only ignores objects | |
70 | that are packed and not in the local object store | |
71 | (i.e. borrowed from an alternate). | |
5f40520f | 72 | |
63ae26f8 NW |
73 | --non-empty:: |
74 | Only create a packed archive if it would contain at | |
75 | least one object. | |
76 | ||
5f40520f JH |
77 | Author |
78 | ------ | |
79 | Written by Linus Torvalds <torvalds@osdl.org> | |
80 | ||
81 | Documentation | |
82 | ------------- | |
83 | Documentation by Junio C Hamano | |
84 | ||
e31bb3bb JH |
85 | See-Also |
86 | -------- | |
df8baa42 JF |
87 | gitlink:git-repack[1] |
88 | gitlink:git-prune-packed[1] | |
e31bb3bb | 89 | |
5f40520f JH |
90 | GIT |
91 | --- | |
a7154e91 | 92 | Part of the gitlink:git[7] suite |
5f40520f | 93 |