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
4 <article lang="en" id="git-check-attr(1)">
\r
6 <title>git-check-attr(1)</title>
\r
8 <primary>git-check-attr(1)</primary>
\r
11 <simplesect id="_name">
\r
13 <simpara>git-check-attr - Display gitattributes information</simpara>
\r
15 <simplesect id="_synopsis">
\r
16 <title>SYNOPSIS</title>
\r
18 <literallayout><emphasis>git check-attr</emphasis> [-a | --all | attr…] [--] pathname…
\r
19 <emphasis>git check-attr</emphasis> --stdin [-z] [-a | --all | attr…] < <list-of-paths></literallayout>
\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
27 <simplesect id="_options">
\r
28 <title>OPTIONS</title>
\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
48 Consider <emphasis>.gitattributes</emphasis> in the index only, ignoring the working tree.
\r
58 Read file names from stdin instead of from the command-line.
\r
68 Only meaningful with <emphasis>--stdin</emphasis>; paths are separated with a
\r
69 NUL character instead of a linefeed character.
\r
79 Interpret all preceding arguments as attributes and all following
\r
80 arguments as path names.
\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
89 <simplesect id="_output">
\r
90 <title>OUTPUT</title>
\r
91 <simpara>The output is of the form:
\r
92 <path> COLON SP <attribute> COLON SP <info> LF</simpara>
\r
93 <simpara><path> is the path of a file being queried, <attribute> is an attribute
\r
94 being queried and <info> can be either:</simpara>
\r
98 <emphasis>unspecified</emphasis>
\r
102 when the attribute is not defined for the path.
\r
108 <emphasis>unset</emphasis>
\r
112 when the attribute is defined as false.
\r
118 <emphasis>set</emphasis>
\r
122 when the attribute is defined as true.
\r
132 when a value has been assigned to the attribute.
\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
147 Listing a single attribute:
\r
151 <screen>$ git check-attr diff org/example/MyClass.java
\r
152 org/example/MyClass.java: diff: java</screen>
\r
156 Listing multiple attributes for a file:
\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
167 Listing all attributes for a file:
\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
177 Listing an attribute for multiple files:
\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
187 Not all values are equally unambiguous:
\r
191 <screen>$ git check-attr caveat README
\r
192 README: caveat: unspecified</screen>
\r
194 <simplesect id="_see_also">
\r
195 <title>SEE ALSO</title>
\r
196 <simpara><xref linkend="gitattributes(5)" />.</simpara>
\r
198 <simplesect id="_git">
\r
200 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
\r