stash: remove now superfluos help for "stash push"
[git.git] / Documentation / git-check-attr.txt
blobaa3b2bf2fcf764ca22f44bcfc081afd4e09328bb
1 git-check-attr(1)
2 =================
4 NAME
5 ----
6 git-check-attr - Display gitattributes information
9 SYNOPSIS
10 --------
11 [verse]
12 'git check-attr' [-a | --all | attr...] [--] pathname...
13 'git check-attr' --stdin [-z] [-a | --all | attr...]
15 DESCRIPTION
16 -----------
17 For every pathname, this command will list if each attribute is 'unspecified',
18 'set', or 'unset' as a gitattribute on that pathname.
20 OPTIONS
21 -------
22 -a, --all::
23         List all attributes that are associated with the specified
24         paths.  If this option is used, then 'unspecified' attributes
25         will not be included in the output.
27 --cached::
28         Consider `.gitattributes` in the index only, ignoring the working tree.
30 --stdin::
31         Read pathnames from the standard input, one per line,
32         instead of from the command-line.
34 -z::
35         The output format is modified to be machine-parseable.
36         If `--stdin` is also given, input paths are separated
37         with a NUL character instead of a linefeed character.
39 \--::
40         Interpret all preceding arguments as attributes and all following
41         arguments as path names.
43 If none of `--stdin`, `--all`, or `--` is used, the first argument
44 will be treated as an attribute and the rest of the arguments as
45 pathnames.
47 OUTPUT
48 ------
50 The output is of the form:
51 <path> COLON SP <attribute> COLON SP <info> LF
53 unless `-z` is in effect, in which case NUL is used as delimiter:
54 <path> NUL <attribute> NUL <info> NUL
57 <path> is the path of a file being queried, <attribute> is an attribute
58 being queried and <info> can be either:
60 'unspecified';; when the attribute is not defined for the path.
61 'unset';;       when the attribute is defined as false.
62 'set';;         when the attribute is defined as true.
63 <value>;;       when a value has been assigned to the attribute.
65 Buffering happens as documented under the `GIT_FLUSH` option in
66 linkgit:git[1].  The caller is responsible for avoiding deadlocks
67 caused by overfilling an input buffer or reading from an empty output
68 buffer.
70 EXAMPLES
71 --------
73 In the examples, the following '.gitattributes' file is used:
74 ---------------
75 *.java diff=java -crlf myAttr
76 NoMyAttr.java !myAttr
77 README caveat=unspecified
78 ---------------
80 * Listing a single attribute:
81 ---------------
82 $ git check-attr diff org/example/MyClass.java
83 org/example/MyClass.java: diff: java
84 ---------------
86 * Listing multiple attributes for a file:
87 ---------------
88 $ git check-attr crlf diff myAttr -- org/example/MyClass.java
89 org/example/MyClass.java: crlf: unset
90 org/example/MyClass.java: diff: java
91 org/example/MyClass.java: myAttr: set
92 ---------------
94 * Listing all attributes for a file:
95 ---------------
96 $ git check-attr --all -- org/example/MyClass.java
97 org/example/MyClass.java: diff: java
98 org/example/MyClass.java: myAttr: set
99 ---------------
101 * Listing an attribute for multiple files:
102 ---------------
103 $ git check-attr myAttr -- org/example/MyClass.java org/example/NoMyAttr.java
104 org/example/MyClass.java: myAttr: set
105 org/example/NoMyAttr.java: myAttr: unspecified
106 ---------------
108 * Not all values are equally unambiguous:
109 ---------------
110 $ git check-attr caveat README
111 README: caveat: unspecified
112 ---------------
114 SEE ALSO
115 --------
116 linkgit:gitattributes[5].
120 Part of the linkgit:git[1] suite