As I have said before, never set core.autocrlf
to true, always to false.
It is a global setting with unintended consequences.
If you have certain type of documents you want to manage in term of eol, do so only through .gitattributes
files and core.eol
directives.
In your case, gitattributes
are a good solution in order to have a fine-grained control on what you want to be converted.
But the general idea is to not convert anything until it is absolutely necessary:
If you can generate or store those text files (used for testing) with the right eol (whatever the underlying OS is), your test cases will be consistent.