Re: [PATCH v2 2/2] File commited with CRLF should roundtrip diff and apply

2017-08-16 Thread Junio C Hamano
tbo...@web.de writes: > Analyze the patch if there is a) any context line with CRLF, > or b) if any line with CRLF is to be removed. > Thanks to Junio C Hamano, his input became the base for the changes in t4124. > One test case is split up into 3: > - Detect the " a\r" line in the patch > - Detec

[PATCH v2 2/2] File commited with CRLF should roundtrip diff and apply

2017-08-16 Thread tboegi
From: Torsten Bögershausen When a file had been commited with CRLF but now .gitattributes say "* text=auto" (or core.autocrlf is true), the following does not roundtrip, `git apply` fails: printf "Added line\r\n" >>file && git diff >patch && git checkout -- . && git apply patch Before applying