Re: mingw, windows, crlf/lf, and git
From: Mark Levedahl <hidden>
Date: 2016-06-15 22:42:53
Jakub Narebski wrote:
Johannes Schindelin wrote:quoted
On Sun, 11 Feb 2007, Mark Levedahl wrote:quoted
The major competing solutions git seeks to supplant (cvs, cvsnt, svn, hg) have capability to recognize "text" files and transparently replace \r\n with \n on input, the reverse on output, and ignore all such differences on diff operations.Agree with transformations on input and output; disagree on diff.I wonder if this could/should be solved with adding some option to git-diff, similar to --ignore-space-change and --ignore-all-space... Just a [idle] thought.
That would work. Assuming blobs are stored in with \n, diff just has to open files in 'rt' mode rather than just 'r' and the \r\n are transformed on read so are never seen by git code. That is basically what Windows native tools do, but they also write files opened in 'wt' mode so \n become \r\n on output. Of course, if this were an option, users could look for line ending differences if they cared. Mark