798e5d5b4f740bf7d579f37df787b315164bffb6
   1git-check-attr(1)
   2=================
   3
   4NAME
   5----
   6git-check-attr - Display gitattributes information
   7
   8
   9SYNOPSIS
  10--------
  11[verse]
  12'git check-attr' [-a | --all | attr...] [--] pathname...
  13'git check-attr' --stdin [-z] [-a | --all | attr...] < <list-of-paths>
  14
  15DESCRIPTION
  16-----------
  17For every pathname, this command will list if each attribute is 'unspecified',
  18'set', or 'unset' as a gitattribute on that pathname.
  19
  20OPTIONS
  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.
  26
  27--stdin::
  28        Read file names from stdin instead of from the command-line.
  29
  30-z::
  31        Only meaningful with `--stdin`; paths are separated with a
  32        NUL character instead of a linefeed character.
  33
  34\--::
  35        Interpret all preceding arguments as attributes and all following
  36        arguments as path names. If not supplied, only the first argument will
  37        be treated as an attribute.
  38
  39OUTPUT
  40------
  41
  42The output is of the form:
  43<path> COLON SP <attribute> COLON SP <info> LF
  44
  45<path> is the path of a file being queried, <attribute> is an attribute
  46being queried and <info> can be either:
  47
  48'unspecified';; when the attribute is not defined for the path.
  49'unset';;       when the attribute is defined as false.
  50'set';;         when the attribute is defined as true.
  51<value>;;       when a value has been assigned to the attribute.
  52
  53EXAMPLES
  54--------
  55
  56In the examples, the following '.gitattributes' file is used:
  57---------------
  58*.java diff=java -crlf myAttr
  59NoMyAttr.java !myAttr
  60README caveat=unspecified
  61---------------
  62
  63* Listing a single attribute:
  64---------------
  65$ git check-attr diff org/example/MyClass.java
  66org/example/MyClass.java: diff: java
  67---------------
  68
  69* Listing multiple attributes for a file:
  70---------------
  71$ git check-attr crlf diff myAttr -- org/example/MyClass.java
  72org/example/MyClass.java: crlf: unset
  73org/example/MyClass.java: diff: java
  74org/example/MyClass.java: myAttr: set
  75---------------
  76
  77* Listing all attributes for a file:
  78---------------
  79$ git check-attr --all -- org/example/MyClass.java
  80org/example/MyClass.java: diff: java
  81org/example/MyClass.java: myAttr: set
  82---------------
  83
  84* Listing an attribute for multiple files:
  85---------------
  86$ git check-attr myAttr -- org/example/MyClass.java org/example/NoMyAttr.java
  87org/example/MyClass.java: myAttr: set
  88org/example/NoMyAttr.java: myAttr: unspecified
  89---------------
  90
  91* Not all values are equally unambiguous:
  92---------------
  93$ git check-attr caveat README
  94README: caveat: unspecified
  95---------------
  96
  97SEE ALSO
  98--------
  99linkgit:gitattributes[5].
 100
 101GIT
 102---
 103Part of the linkgit:git[1] suite