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