xref: /trunk/.gitattributes (revision 91144cd0085a7583d2099b982122deb2184ab956)
1# Patch files must never be end-of-line normalised.
2#
3# A patch is compared against its target byte for byte -- tg_ext.mk applies
4# these with `patch --binary' on Windows -- so a patch whose context lines came
5# from a CRLF file has to keep them.  Without this, git converts on the way in
6# or out depending on core.autocrlf, and the patch then fails to apply on some
7# machines and not others, which is a miserable thing to debug.
8#
9# ext_libraries/coinmp/coinmp-1.8.4-v10-sln-paths.patch is the case that
10# prompted this: it patches a Visual Studio .sln, which is CRLF throughout.
11# Existing patches are LF-only, so marking them changes none of their bytes.
12*.patch -text
13*.diff  -text
14