updated git doc
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-cat-file.xml
blob395d7b01d8fa36d583b0168db95d110c6dcc1a1c
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-cat-file(1)">\r
5 <articleinfo>\r
6     <title>git-cat-file(1)</title>\r
7 <indexterm>\r
8 <primary>git-cat-file(1)</primary>\r
9 </indexterm>\r
10 </articleinfo>\r
11 <simplesect id="_name">\r
12 <title>NAME</title>\r
13 <simpara>git-cat-file - Provide content or type and size information for repository objects</simpara>\r
14 </simplesect>\r
15 <simplesect id="_synopsis">\r
16 <title>SYNOPSIS</title>\r
17 <blockquote>\r
18 <literallayout><emphasis>git cat-file</emphasis> (-t | -s | -e | -p | &lt;type&gt; | --textconv ) &lt;object&gt;\r
19 <emphasis>git cat-file</emphasis> (--batch | --batch-check) &lt; &lt;list-of-objects&gt;</literallayout>\r
20 </blockquote>\r
21 </simplesect>\r
22 <simplesect id="_description">\r
23 <title>DESCRIPTION</title>\r
24 <simpara>In its first form, the command provides the content or the type of an object in\r
25 the repository. The type is required unless <emphasis>-t</emphasis> or <emphasis>-p</emphasis> is used to find the\r
26 object type, or <emphasis>-s</emphasis> is used to find the object size, or <emphasis>--textconv</emphasis> is used\r
27 (which implies type "blob").</simpara>\r
28 <simpara>In the second form, a list of objects (separated by linefeeds) is provided on\r
29 stdin, and the SHA1, type, and size of each object is printed on stdout.</simpara>\r
30 </simplesect>\r
31 <simplesect id="_options">\r
32 <title>OPTIONS</title>\r
33 <variablelist>\r
34 <varlistentry>\r
35 <term>\r
36 &lt;object&gt;\r
37 </term>\r
38 <listitem>\r
39 <simpara>\r
40         The name of the object to show.\r
41         For a more complete list of ways to spell object names, see\r
42         the "SPECIFYING REVISIONS" section in <xref linkend="gitrevisions(7)" />.\r
43 </simpara>\r
44 </listitem>\r
45 </varlistentry>\r
46 <varlistentry>\r
47 <term>\r
48 -t\r
49 </term>\r
50 <listitem>\r
51 <simpara>\r
52         Instead of the content, show the object type identified by\r
53         &lt;object&gt;.\r
54 </simpara>\r
55 </listitem>\r
56 </varlistentry>\r
57 <varlistentry>\r
58 <term>\r
59 -s\r
60 </term>\r
61 <listitem>\r
62 <simpara>\r
63         Instead of the content, show the object size identified by\r
64         &lt;object&gt;.\r
65 </simpara>\r
66 </listitem>\r
67 </varlistentry>\r
68 <varlistentry>\r
69 <term>\r
70 -e\r
71 </term>\r
72 <listitem>\r
73 <simpara>\r
74         Suppress all output; instead exit with zero status if &lt;object&gt;\r
75         exists and is a valid object.\r
76 </simpara>\r
77 </listitem>\r
78 </varlistentry>\r
79 <varlistentry>\r
80 <term>\r
81 -p\r
82 </term>\r
83 <listitem>\r
84 <simpara>\r
85         Pretty-print the contents of &lt;object&gt; based on its type.\r
86 </simpara>\r
87 </listitem>\r
88 </varlistentry>\r
89 <varlistentry>\r
90 <term>\r
91 &lt;type&gt;\r
92 </term>\r
93 <listitem>\r
94 <simpara>\r
95         Typically this matches the real type of &lt;object&gt; but asking\r
96         for a type that can trivially be dereferenced from the given\r
97         &lt;object&gt; is also permitted.  An example is to ask for a\r
98         "tree" with &lt;object&gt; being a commit object that contains it,\r
99         or to ask for a "blob" with &lt;object&gt; being a tag object that\r
100         points at it.\r
101 </simpara>\r
102 </listitem>\r
103 </varlistentry>\r
104 <varlistentry>\r
105 <term>\r
106 --textconv\r
107 </term>\r
108 <listitem>\r
109 <simpara>\r
110         Show the content as transformed by a textconv filter. In this case,\r
111         &lt;object&gt; has be of the form &lt;treeish&gt;:&lt;path&gt;, or :&lt;path&gt; in order\r
112         to apply the filter to the content recorded in the index at &lt;path&gt;.\r
113 </simpara>\r
114 </listitem>\r
115 </varlistentry>\r
116 <varlistentry>\r
117 <term>\r
118 --batch\r
119 </term>\r
120 <listitem>\r
121 <simpara>\r
122         Print the SHA1, type, size, and contents of each object provided on\r
123         stdin. May not be combined with any other options or arguments.\r
124 </simpara>\r
125 </listitem>\r
126 </varlistentry>\r
127 <varlistentry>\r
128 <term>\r
129 --batch-check\r
130 </term>\r
131 <listitem>\r
132 <simpara>\r
133         Print the SHA1, type, and size of each object provided on stdin. May not\r
134         be combined with any other options or arguments.\r
135 </simpara>\r
136 </listitem>\r
137 </varlistentry>\r
138 </variablelist>\r
139 </simplesect>\r
140 <simplesect id="_output">\r
141 <title>OUTPUT</title>\r
142 <simpara>If <emphasis>-t</emphasis> is specified, one of the &lt;type&gt;.</simpara>\r
143 <simpara>If <emphasis>-s</emphasis> is specified, the size of the &lt;object&gt; in bytes.</simpara>\r
144 <simpara>If <emphasis>-e</emphasis> is specified, no output.</simpara>\r
145 <simpara>If <emphasis>-p</emphasis> is specified, the contents of &lt;object&gt; are pretty-printed.</simpara>\r
146 <simpara>If &lt;type&gt; is specified, the raw (though uncompressed) contents of the &lt;object&gt;\r
147 will be returned.</simpara>\r
148 <simpara>If <emphasis>--batch</emphasis> is specified, output of the following form is printed for each\r
149 object specified on stdin:</simpara>\r
150 <screen>&lt;sha1&gt; SP &lt;type&gt; SP &lt;size&gt; LF\r
151 &lt;contents&gt; LF</screen>\r
152 <simpara>If <emphasis>--batch-check</emphasis> is specified, output of the following form is printed for\r
153 each object specified on stdin:</simpara>\r
154 <screen>&lt;sha1&gt; SP &lt;type&gt; SP &lt;size&gt; LF</screen>\r
155 <simpara>For both <emphasis>--batch</emphasis> and <emphasis>--batch-check</emphasis>, output of the following form is printed\r
156 for each object specified on stdin that does not exist in the repository:</simpara>\r
157 <screen>&lt;object&gt; SP missing LF</screen>\r
158 </simplesect>\r
159 <simplesect id="_git">\r
160 <title>GIT</title>\r
161 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
162 </simplesect>\r
163 </article>\r