6 git-check-attr - Display gitattributes information.
11 'git check-attr' attr... [--] pathname...
15 For every pathname, this command will list if each attr is 'unspecified',
16 'set', or 'unset' as a gitattribute on that pathname.
21 Interpret all preceding arguments as attributes, and all following
22 arguments as path names. If not supplied, only the first argument will
23 be treated as an attribute.
28 The output is of the form:
29 <path> COLON SP <attribute> COLON SP <info> LF
31 Where <path> is the path of a file being queried, <attribute> is an attribute
32 being queried and <info> can be either:
34 'unspecified';; when the attribute is not defined for the path.
35 'unset';; when the attribute is defined to false.
36 'set';; when the attribute is defined to true.
37 <value>;; when a value has been assigned to the attribute.
42 In the examples, the following '.gitattributes' file is used:
44 *.java diff=java -crlf myAttr
46 README caveat=unspecified
49 * Listing a single attribute:
51 $ git check-attr diff org/example/MyClass.java
52 org/example/MyClass.java: diff: java
55 * Listing multiple attributes for a file:
57 $ git check-attr crlf diff myAttr -- org/example/MyClass.java
58 org/example/MyClass.java: crlf: unset
59 org/example/MyClass.java: diff: java
60 org/example/MyClass.java: myAttr: set
63 * Listing attribute for multiple files:
65 $ git check-attr myAttr -- org/example/MyClass.java org/example/NoMyAttr.java
66 org/example/MyClass.java: myAttr: set
67 org/example/NoMyAttr.java: myAttr: unspecified
70 * Not all values are equally unambiguous:
72 $ git check-attr caveat README
73 README: caveat: unspecified
78 linkgit:gitattributes[5].
83 Written by Junio C Hamano <gitster@pobox.com>
87 Documentation by James Bowes.
91 Part of the linkgit:git[1] suite