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