Documentation / git-check-attr.txton commit Merge branch 'bs/userdiff-php' (9559910)
   1git-check-attr(1)
   2=================
   3
   4NAME
   5----
   6git-check-attr - Display gitattributes information
   7
   8
   9SYNOPSIS
  10--------
  11[verse]
  12'git check-attr' attr... [--] pathname...
  13'git check-attr' --stdin [-z] 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--stdin::
  23        Read file names from stdin instead of from the command-line.
  24
  25-z::
  26        Only meaningful with `--stdin`; paths are separated with a
  27        NUL character instead of a linefeed character.
  28
  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.
  33
  34OUTPUT
  35------
  36
  37The output is of the form:
  38<path> COLON SP <attribute> COLON SP <info> LF
  39
  40<path> is the path of a file being queried, <attribute> is an attribute
  41being queried and <info> can be either:
  42
  43'unspecified';; when the attribute is not defined for the path.
  44'unset';;       when the attribute is defined as false.
  45'set';;         when the attribute is defined as true.
  46<value>;;       when a value has been assigned to the attribute.
  47
  48EXAMPLES
  49--------
  50
  51In the examples, the following '.gitattributes' file is used:
  52---------------
  53*.java diff=java -crlf myAttr
  54NoMyAttr.java !myAttr
  55README caveat=unspecified
  56---------------
  57
  58* Listing a single attribute:
  59---------------
  60$ git check-attr diff org/example/MyClass.java
  61org/example/MyClass.java: diff: java
  62---------------
  63
  64* Listing multiple attributes for a file:
  65---------------
  66$ git check-attr crlf diff myAttr -- org/example/MyClass.java
  67org/example/MyClass.java: crlf: unset
  68org/example/MyClass.java: diff: java
  69org/example/MyClass.java: myAttr: set
  70---------------
  71
  72* Listing an attribute for multiple files:
  73---------------
  74$ git check-attr myAttr -- org/example/MyClass.java org/example/NoMyAttr.java
  75org/example/MyClass.java: myAttr: set
  76org/example/NoMyAttr.java: myAttr: unspecified
  77---------------
  78
  79* Not all values are equally unambiguous:
  80---------------
  81$ git check-attr caveat README
  82README: caveat: unspecified
  83---------------
  84
  85SEE ALSO
  86--------
  87linkgit:gitattributes[5].
  88
  89
  90Author
  91------
  92Written by Junio C Hamano <gitster@pobox.com>
  93
  94Documentation
  95--------------
  96Documentation by James Bowes.
  97
  98GIT
  99---
 100Part of the linkgit:git[1] suite