updated git doc
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-check-attr.xml
blob59361d096806b318524326b6606fd204ba7e2e63
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-check-attr(1)">\r
5 <articleinfo>\r
6     <title>git-check-attr(1)</title>\r
7 <indexterm>\r
8 <primary>git-check-attr(1)</primary>\r
9 </indexterm>\r
10 </articleinfo>\r
11 <simplesect id="_name">\r
12 <title>NAME</title>\r
13 <simpara>git-check-attr - Display gitattributes information</simpara>\r
14 </simplesect>\r
15 <simplesect id="_synopsis">\r
16 <title>SYNOPSIS</title>\r
17 <blockquote>\r
18 <literallayout><emphasis>git check-attr</emphasis> [-a | --all | attr&#8230;] [--] pathname&#8230;\r
19 <emphasis>git check-attr</emphasis> --stdin [-z] [-a | --all | attr&#8230;] &lt; &lt;list-of-paths&gt;</literallayout>\r
20 </blockquote>\r
21 </simplesect>\r
22 <simplesect id="_description">\r
23 <title>DESCRIPTION</title>\r
24 <simpara>For every pathname, this command will list if each attribute is <emphasis>unspecified</emphasis>,\r
25 <emphasis>set</emphasis>, or <emphasis>unset</emphasis> as a gitattribute on that pathname.</simpara>\r
26 </simplesect>\r
27 <simplesect id="_options">\r
28 <title>OPTIONS</title>\r
29 <variablelist>\r
30 <varlistentry>\r
31 <term>\r
32 -a, --all\r
33 </term>\r
34 <listitem>\r
35 <simpara>\r
36         List all attributes that are associated with the specified\r
37         paths.  If this option is used, then <emphasis>unspecified</emphasis> attributes\r
38         will not be included in the output.\r
39 </simpara>\r
40 </listitem>\r
41 </varlistentry>\r
42 <varlistentry>\r
43 <term>\r
44 --cached\r
45 </term>\r
46 <listitem>\r
47 <simpara>\r
48         Consider <emphasis>.gitattributes</emphasis> in the index only, ignoring the working tree.\r
49 </simpara>\r
50 </listitem>\r
51 </varlistentry>\r
52 <varlistentry>\r
53 <term>\r
54 --stdin\r
55 </term>\r
56 <listitem>\r
57 <simpara>\r
58         Read file names from stdin instead of from the command-line.\r
59 </simpara>\r
60 </listitem>\r
61 </varlistentry>\r
62 <varlistentry>\r
63 <term>\r
64 -z\r
65 </term>\r
66 <listitem>\r
67 <simpara>\r
68         Only meaningful with <emphasis>--stdin</emphasis>; paths are separated with a\r
69         NUL character instead of a linefeed character.\r
70 </simpara>\r
71 </listitem>\r
72 </varlistentry>\r
73 <varlistentry>\r
74 <term>\r
75 --\r
76 </term>\r
77 <listitem>\r
78 <simpara>\r
79         Interpret all preceding arguments as attributes and all following\r
80         arguments as path names.\r
81 </simpara>\r
82 </listitem>\r
83 </varlistentry>\r
84 </variablelist>\r
85 <simpara>If none of <emphasis>--stdin</emphasis>, <emphasis>--all</emphasis>, or <emphasis>--</emphasis> is used, the first argument\r
86 will be treated as an attribute and the rest of the arguments as\r
87 pathnames.</simpara>\r
88 </simplesect>\r
89 <simplesect id="_output">\r
90 <title>OUTPUT</title>\r
91 <simpara>The output is of the form:\r
92 &lt;path&gt; COLON SP &lt;attribute&gt; COLON SP &lt;info&gt; LF</simpara>\r
93 <simpara>&lt;path&gt; is the path of a file being queried, &lt;attribute&gt; is an attribute\r
94 being queried and &lt;info&gt; can be either:</simpara>\r
95 <variablelist>\r
96 <varlistentry>\r
97 <term>\r
98 <emphasis>unspecified</emphasis>\r
99 </term>\r
100 <listitem>\r
101 <simpara>\r
102 when the attribute is not defined for the path.\r
103 </simpara>\r
104 </listitem>\r
105 </varlistentry>\r
106 <varlistentry>\r
107 <term>\r
108 <emphasis>unset</emphasis>\r
109 </term>\r
110 <listitem>\r
111 <simpara>\r
112 when the attribute is defined as false.\r
113 </simpara>\r
114 </listitem>\r
115 </varlistentry>\r
116 <varlistentry>\r
117 <term>\r
118 <emphasis>set</emphasis>\r
119 </term>\r
120 <listitem>\r
121 <simpara>\r
122 when the attribute is defined as true.\r
123 </simpara>\r
124 </listitem>\r
125 </varlistentry>\r
126 <varlistentry>\r
127 <term>\r
128 &lt;value&gt;\r
129 </term>\r
130 <listitem>\r
131 <simpara>\r
132 when a value has been assigned to the attribute.\r
133 </simpara>\r
134 </listitem>\r
135 </varlistentry>\r
136 </variablelist>\r
137 </simplesect>\r
138 <simplesect id="_examples">\r
139 <title>EXAMPLES</title>\r
140 <simpara>In the examples, the following <emphasis>.gitattributes</emphasis> file is used:</simpara>\r
141 <screen>*.java diff=java -crlf myAttr\r
142 NoMyAttr.java !myAttr\r
143 README caveat=unspecified</screen>\r
144 <itemizedlist>\r
145 <listitem>\r
146 <simpara>\r
147 Listing a single attribute:\r
148 </simpara>\r
149 </listitem>\r
150 </itemizedlist>\r
151 <screen>$ git check-attr diff org/example/MyClass.java\r
152 org/example/MyClass.java: diff: java</screen>\r
153 <itemizedlist>\r
154 <listitem>\r
155 <simpara>\r
156 Listing multiple attributes for a file:\r
157 </simpara>\r
158 </listitem>\r
159 </itemizedlist>\r
160 <screen>$ git check-attr crlf diff myAttr -- org/example/MyClass.java\r
161 org/example/MyClass.java: crlf: unset\r
162 org/example/MyClass.java: diff: java\r
163 org/example/MyClass.java: myAttr: set</screen>\r
164 <itemizedlist>\r
165 <listitem>\r
166 <simpara>\r
167 Listing all attributes for a file:\r
168 </simpara>\r
169 </listitem>\r
170 </itemizedlist>\r
171 <screen>$ git check-attr --all -- org/example/MyClass.java\r
172 org/example/MyClass.java: diff: java\r
173 org/example/MyClass.java: myAttr: set</screen>\r
174 <itemizedlist>\r
175 <listitem>\r
176 <simpara>\r
177 Listing an attribute for multiple files:\r
178 </simpara>\r
179 </listitem>\r
180 </itemizedlist>\r
181 <screen>$ git check-attr myAttr -- org/example/MyClass.java org/example/NoMyAttr.java\r
182 org/example/MyClass.java: myAttr: set\r
183 org/example/NoMyAttr.java: myAttr: unspecified</screen>\r
184 <itemizedlist>\r
185 <listitem>\r
186 <simpara>\r
187 Not all values are equally unambiguous:\r
188 </simpara>\r
189 </listitem>\r
190 </itemizedlist>\r
191 <screen>$ git check-attr caveat README\r
192 README: caveat: unspecified</screen>\r
193 </simplesect>\r
194 <simplesect id="_see_also">\r
195 <title>SEE ALSO</title>\r
196 <simpara><xref linkend="gitattributes(5)" />.</simpara>\r
197 </simplesect>\r
198 <simplesect id="_git">\r
199 <title>GIT</title>\r
200 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
201 </simplesect>\r
202 </article>\r