TL;DR
diff=astextplain
(msysGit only): converts those files (under the condition that their extension be *.doc
, *.pdf
, *.rtf
, etc.) to a text format before generating their diff.
diff
: treat those files as plain text for generating their diff.
text=auto
: automatically normalize EOL characters (to LF) in files deemed to be text files by Git.
More details
diff=astextplain
The string value astextplain
is not part of Git core: in fact, running
git grep "astextplain"
in the Git project repository returns nothing. As far as I can tell, it's a shell script that ships with msysGit and allows you to convert files such as
to a text format before generating their diff.
diff
According to the gitattributes
man page:
The attribute diff
affects how Git generates diffs for particular files.
[...]
A path to which the diff
attribute is set is treated as text, even when they contain byte values that normally never appear in text files, such as NUL.
text=auto
According to the gitattributes
man page:
When text
is set to "auto", the path is marked for automatic end-of-line normalization. If Git decides that the content is text, its line endings are normalized to LF on checkin.