[PATCH] Documentation: packed GIT support commands.
[git/git.git] / Documentation / git-pack-objects.txt
CommitLineData
5f40520f
JH
1git-pack-objects(1)
2===================
3v0.1, July 2005
4
5NAME
6----
7git-pack-objects - Create a packed archive of objects.
8
9
10SYNOPSIS
11--------
12'git-pack-objects' [--incremental] [--window=N] [--depth=N] {--stdout | base-name} < object-list
13
14
15DESCRIPTION
16-----------
17Reads list of objects from the standard input, and writes a packed
18archive with specified base-name, or to the standard output.
19
20A packed archive is an efficient way to transfer set of objects
21between two repositories, and also is an archival format which
22is efficient to access. The packed archive format (.pack) is
23designed to be unpackable without having anything else, but for
24random access, accompanied with the pack index file (.idx).
25
26'git-unpack-objects' command can read the packed archive and
27expand the objects contained in the pack into "one-file
28one-object" format; this is typically done by the smart-pull
29commands when a pack is created on-the-fly for efficient network
30transport by their peers.
31
32Placing both in pack subdirectory of $GIT_OBJECT_DIRECTORY (or
33any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES)
34enables GIT to read from such an archive.
35
36
37OPTIONS
38-------
39base-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
69Author
70------
71Written by Linus Torvalds <torvalds@osdl.org>
72
73Documentation
74-------------
75Documentation by Junio C Hamano
76
77GIT
78---
79Part of the link:git.html[git] suite
80