Documentation / git-check-attr.txton commit diff.c: emit_add_line() takes only the rest of the line (018cff7)
   1git-check-attr(1)
   2=================
   3
   4NAME
   5----
   6git-check-attr - Display gitattributes information
   7
   8
   9SYNOPSIS
  10--------
  11'git check-attr' attr... [--] pathname...
  12
  13DESCRIPTION
  14-----------
  15For every pathname, this command will list if each attr is 'unspecified',
  16'set', or 'unset' as a gitattribute on that pathname.
  17
  18OPTIONS
  19-------
  20\--::
  21        Interpret all preceding arguments as attributes, and all following
  22        arguments as path names. If not supplied, only the first argument will
  23        be treated as an attribute.
  24
  25OUTPUT
  26------
  27
  28The output is of the form:
  29<path> COLON SP <attribute> COLON SP <info> LF
  30
  31Where <path> is the path of a file being queried, <attribute> is an attribute
  32being queried and <info> can be either:
  33
  34'unspecified';; when the attribute is not defined for the path.
  35'unset';;       when the attribute is defined to false.
  36'set';;         when the attribute is defined to true.
  37<value>;;       when a value has been assigned to the attribute.
  38
  39EXAMPLES
  40--------
  41
  42In the examples, the following '.gitattributes' file is used:
  43---------------
  44*.java diff=java -crlf myAttr
  45NoMyAttr.java !myAttr
  46README caveat=unspecified
  47---------------
  48
  49* Listing a single attribute:
  50---------------
  51$ git check-attr diff org/example/MyClass.java
  52org/example/MyClass.java: diff: java
  53---------------
  54
  55* Listing multiple attributes for a file:
  56---------------
  57$ git check-attr crlf diff myAttr -- org/example/MyClass.java
  58org/example/MyClass.java: crlf: unset
  59org/example/MyClass.java: diff: java
  60org/example/MyClass.java: myAttr: set
  61---------------
  62
  63* Listing attribute for multiple files:
  64---------------
  65$ git check-attr myAttr -- org/example/MyClass.java org/example/NoMyAttr.java
  66org/example/MyClass.java: myAttr: set
  67org/example/NoMyAttr.java: myAttr: unspecified
  68---------------
  69
  70* Not all values are equally unambiguous:
  71---------------
  72$ git check-attr caveat README
  73README: caveat: unspecified
  74---------------
  75
  76SEE ALSO
  77--------
  78linkgit:gitattributes[5].
  79
  80
  81Author
  82------
  83Written by Junio C Hamano <gitster@pobox.com>
  84
  85Documentation
  86--------------
  87Documentation by James Bowes.
  88
  89GIT
  90---
  91Part of the linkgit:git[1] suite