builtin-fast-export.c: turn error into warning
[git/dscho.git] / Documentation / git-check-attr.txt
blob8c2ac12f5d316a5db8c5a9be2c4d9639ca30653b
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' attr... [--] pathname...
13 'git check-attr' --stdin [-z] attr... < <list-of-paths>
15 DESCRIPTION
16 -----------
17 For every pathname, this command will list if each attr is 'unspecified',
18 'set', or 'unset' as a gitattribute on that pathname.
20 OPTIONS
21 -------
22 --stdin::
23         Read file names from stdin instead of from the command-line.
25 -z::
26         Only meaningful with `--stdin`; paths are separated with
27         NUL character instead of LF.
29 \--::
30         Interpret all preceding arguments as attributes, and all following
31         arguments as path names. If not supplied, only the first argument will
32         be treated as an attribute.
34 OUTPUT
35 ------
37 The output is of the form:
38 <path> COLON SP <attribute> COLON SP <info> LF
40 Where <path> is the path of a file being queried, <attribute> is an attribute
41 being queried and <info> can be either:
43 'unspecified';; when the attribute is not defined for the path.
44 'unset';;       when the attribute is defined to false.
45 'set';;         when the attribute is defined to true.
46 <value>;;       when a value has been assigned to the attribute.
48 EXAMPLES
49 --------
51 In the examples, the following '.gitattributes' file is used:
52 ---------------
53 *.java diff=java -crlf myAttr
54 NoMyAttr.java !myAttr
55 README caveat=unspecified
56 ---------------
58 * Listing a single attribute:
59 ---------------
60 $ git check-attr diff org/example/MyClass.java
61 org/example/MyClass.java: diff: java
62 ---------------
64 * Listing multiple attributes for a file:
65 ---------------
66 $ git check-attr crlf diff myAttr -- org/example/MyClass.java
67 org/example/MyClass.java: crlf: unset
68 org/example/MyClass.java: diff: java
69 org/example/MyClass.java: myAttr: set
70 ---------------
72 * Listing attribute for multiple files:
73 ---------------
74 $ git check-attr myAttr -- org/example/MyClass.java org/example/NoMyAttr.java
75 org/example/MyClass.java: myAttr: set
76 org/example/NoMyAttr.java: myAttr: unspecified
77 ---------------
79 * Not all values are equally unambiguous:
80 ---------------
81 $ git check-attr caveat README
82 README: caveat: unspecified
83 ---------------
85 SEE ALSO
86 --------
87 linkgit:gitattributes[5].
90 Author
91 ------
92 Written by Junio C Hamano <gitster@pobox.com>
94 Documentation
95 --------------
96 Documentation by James Bowes.
98 GIT
99 ---
100 Part of the linkgit:git[1] suite