1GIT-CHECK-ATTR(1) Git Manual GIT-CHECK-ATTR(1)
2
3
4
6 git-check-attr - Display gitattributes information
7
9 git check-attr attr... [--] pathname...
10 git check-attr --stdin [-z] attr... < <list-of-paths>
11
12
14 For every pathname, this command will list if each attribute is
15 unspecified, set, or unset as a gitattribute on that pathname.
16
18 --stdin
19 Read file names from stdin instead of from the command-line.
20
21 -z
22 Only meaningful with --stdin; paths are separated with a NUL
23 character instead of a linefeed character.
24
25 --
26 Interpret all preceding arguments as attributes and all following
27 arguments as path names. If not supplied, only the first argument
28 will be treated as an attribute.
29
31 The output is of the form: <path> COLON SP <attribute> COLON SP <info>
32 LF
33
34 <path> is the path of a file being queried, <attribute> is an attribute
35 being queried and <info> can be either:
36
37 unspecified
38 when the attribute is not defined for the path.
39
40 unset
41 when the attribute is defined as false.
42
43 set
44 when the attribute is defined as true.
45
46 <value>
47 when a value has been assigned to the attribute.
48
50 In the examples, the following .gitattributes file is used:
51
52 *.java diff=java -crlf myAttr
53 NoMyAttr.java !myAttr
54 README caveat=unspecified
55
56
57
58 · Listing a single attribute:
59
60 $ git check-attr diff org/example/MyClass.java
61 org/example/MyClass.java: diff: java
62
63
64
65 · Listing multiple attributes for a file:
66
67 $ git check-attr crlf diff myAttr -- org/example/MyClass.java
68 org/example/MyClass.java: crlf: unset
69 org/example/MyClass.java: diff: java
70 org/example/MyClass.java: myAttr: set
71
72
73
74 · Listing an attribute for multiple files:
75
76 $ git check-attr myAttr -- org/example/MyClass.java org/example/NoMyAttr.java
77 org/example/MyClass.java: myAttr: set
78 org/example/NoMyAttr.java: myAttr: unspecified
79
80
81
82 · Not all values are equally unambiguous:
83
84 $ git check-attr caveat README
85 README: caveat: unspecified
86
87
89 gitattributes(5).
90
92 Written by Junio C Hamano <gitster@pobox.com[1]>
93
95 Documentation by James Bowes.
96
98 Part of the git(1) suite
99
101 1. gitster@pobox.com
102 mailto:gitster@pobox.com
103
104
105
106Git 1.7.4.4 04/11/2011 GIT-CHECK-ATTR(1)