Just moved to git and encountered a problem which has been discussed in detail here
I wanted to understand given that we have set core.autocrlf=true by default and we deal with vast amount of java i/o and consequently have various test cases for the same ; how can we ensure that unit test cases developed by a dev on win can execute correctly for a dev on linux and vice versa.
for eg. a unit test case reads in a text file (*.ext) and compares the length of the bytes as expected vs actual then on win ; a git pull with core.autocrlf=true will have pulled in the text file and converted all LF to CRLF . Consider for instance the test case is interested in the byte count and thus on win the byte count will be more. On commit the CRLF wud be converted to LF ; but the test wud then fail for the dev on linux.
Can this managed with .gitattributes ?
In .gitattributes -> *.ext text
this would normalize the file on commit and will still suffer from the above problem ? Pointers welcome, Thanks in advance