Updated git_doc to git 1.8
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-index-pack.xml
blob13c3318e4619c5330315a6e277b17d0aaee54b46
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">\r
3 \r
4 <sect2 lang="en" id="git-index-pack(1)">\r
5     <title>git-index-pack(1)</title>\r
6 <indexterm>\r
7 <primary>git-index-pack(1)</primary>\r
8 </indexterm>\r
9 <simplesect id="git-index-pack(1)__name">\r
10 <title>NAME</title>\r
11 <simpara>git-index-pack - Build pack index file for an existing packed archive</simpara>\r
12 </simplesect>\r
13 <simplesect id="git-index-pack(1)__synopsis">\r
14 <title>SYNOPSIS</title>\r
15 <blockquote>\r
16 <literallayout><emphasis>git index-pack</emphasis> [-v] [-o &lt;index-file&gt;] &lt;pack-file&gt;\r
17 <emphasis>git index-pack</emphasis> --stdin [--fix-thin] [--keep] [-v] [-o &lt;index-file&gt;]\r
18                  [&lt;pack-file&gt;]</literallayout>\r
19 </blockquote>\r
20 </simplesect>\r
21 <simplesect id="git-index-pack(1)__description">\r
22 <title>DESCRIPTION</title>\r
23 <simpara>Reads a packed archive (.pack) from the specified file, and\r
24 builds a pack index file (.idx) for it.  The packed archive\r
25 together with the pack index can then be placed in the\r
26 objects/pack/ directory of a git repository.</simpara>\r
27 </simplesect>\r
28 <simplesect id="git-index-pack(1)__options">\r
29 <title>OPTIONS</title>\r
30 <variablelist>\r
31 <varlistentry>\r
32 <term>\r
33 -v\r
34 </term>\r
35 <listitem>\r
36 <simpara>\r
37         Be verbose about what is going on, including progress status.\r
38 </simpara>\r
39 </listitem>\r
40 </varlistentry>\r
41 <varlistentry>\r
42 <term>\r
43 -o &lt;index-file&gt;\r
44 </term>\r
45 <listitem>\r
46 <simpara>\r
47         Write the generated pack index into the specified\r
48         file.  Without this option the name of pack index\r
49         file is constructed from the name of packed archive\r
50         file by replacing .pack with .idx (and the program\r
51         fails if the name of packed archive does not end\r
52         with .pack).\r
53 </simpara>\r
54 </listitem>\r
55 </varlistentry>\r
56 <varlistentry>\r
57 <term>\r
58 --stdin\r
59 </term>\r
60 <listitem>\r
61 <simpara>\r
62         When this flag is provided, the pack is read from stdin\r
63         instead and a copy is then written to &lt;pack-file&gt;. If\r
64         &lt;pack-file&gt; is not specified, the pack is written to\r
65         objects/pack/ directory of the current git repository with\r
66         a default name determined from the pack content.  If\r
67         &lt;pack-file&gt; is not specified consider using --keep to\r
68         prevent a race condition between this process and\r
69         <emphasis>git repack</emphasis>.\r
70 </simpara>\r
71 </listitem>\r
72 </varlistentry>\r
73 <varlistentry>\r
74 <term>\r
75 --fix-thin\r
76 </term>\r
77 <listitem>\r
78 <simpara>\r
79         Fix a "thin" pack produced by <emphasis>git pack-objects --thin</emphasis> (see\r
80         <xref linkend="git-pack-objects(1)" /> for details) by adding the\r
81         excluded objects the deltified objects are based on to the\r
82         pack. This option only makes sense in conjunction with --stdin.\r
83 </simpara>\r
84 </listitem>\r
85 </varlistentry>\r
86 <varlistentry>\r
87 <term>\r
88 --keep\r
89 </term>\r
90 <listitem>\r
91 <simpara>\r
92         Before moving the index into its final destination\r
93         create an empty .keep file for the associated pack file.\r
94         This option is usually necessary with --stdin to prevent a\r
95         simultaneous <emphasis>git repack</emphasis> process from deleting\r
96         the newly constructed pack and index before refs can be\r
97         updated to use objects contained in the pack.\r
98 </simpara>\r
99 </listitem>\r
100 </varlistentry>\r
101 <varlistentry>\r
102 <term>\r
103 --keep=&lt;msg&gt;\r
104 </term>\r
105 <listitem>\r
106 <simpara>\r
107         Like --keep create a .keep file before moving the index into\r
108         its final destination, but rather than creating an empty file\r
109         place <emphasis>&lt;msg&gt;</emphasis> followed by an LF into the .keep file.  The <emphasis>&lt;msg&gt;</emphasis>\r
110         message can later be searched for within all .keep files to\r
111         locate any which have outlived their usefulness.\r
112 </simpara>\r
113 </listitem>\r
114 </varlistentry>\r
115 <varlistentry>\r
116 <term>\r
117 --index-version=&lt;version&gt;[,&lt;offset&gt;]\r
118 </term>\r
119 <listitem>\r
120 <simpara>\r
121         This is intended to be used by the test suite only. It allows\r
122         to force the version for the generated pack index, and to force\r
123         64-bit index entries on objects located above the given offset.\r
124 </simpara>\r
125 </listitem>\r
126 </varlistentry>\r
127 <varlistentry>\r
128 <term>\r
129 --strict\r
130 </term>\r
131 <listitem>\r
132 <simpara>\r
133         Die, if the pack contains broken objects or links.\r
134 </simpara>\r
135 </listitem>\r
136 </varlistentry>\r
137 <varlistentry>\r
138 <term>\r
139 --threads=&lt;n&gt;\r
140 </term>\r
141 <listitem>\r
142 <simpara>\r
143         Specifies the number of threads to spawn when resolving\r
144         deltas. This requires that index-pack be compiled with\r
145         pthreads otherwise this option is ignored with a warning.\r
146         This is meant to reduce packing time on multiprocessor\r
147         machines. The required amount of memory for the delta search\r
148         window is however multiplied by the number of threads.\r
149         Specifying 0 will cause git to auto-detect the number of CPU's\r
150         and use maximum 3 threads.\r
151 </simpara>\r
152 </listitem>\r
153 </varlistentry>\r
154 </variablelist>\r
155 </simplesect>\r
156 <simplesect id="git-index-pack(1)__note">\r
157 <title>Note</title>\r
158 <simpara>Once the index has been created, the list of object names is sorted\r
159 and the SHA1 hash of that list is printed to stdout. If --stdin was\r
160 also used then this is prefixed by either "pack\t", or "keep\t" if a\r
161 new .keep file was successfully created. This is useful to remove a\r
162 .keep file used as a lock to prevent the race with <emphasis>git repack</emphasis>\r
163 mentioned above.</simpara>\r
164 </simplesect>\r
165 <simplesect id="git-index-pack(1)__git">\r
166 <title>GIT</title>\r
167 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
168 </simplesect>\r
169 </sect2>\r