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

2017-08-14 Thread Junio C Hamano
tbo...@web.de writes: > From: Torsten Bögershausen > > When a file had been commited with CRLF and 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 Should this tweak b

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

2017-08-12 Thread tboegi
From: Torsten Bögershausen When a file had been commited with CRLF and 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 the patch, the file from working tree is c