[darcs-devel] [darcs #240] Non-Unix line ending support needed

Tommy Pettersson ptp at lysator.liu.se
Fri Mar 11 07:37:27 PST 2005


I've just read through the line ending discussion.  I skipped
most of it the first time since I'm on unix only.

I support the idea of an optional filter between the working
three and darcs' internals that transform any kind of line
endings in text files in both directions, to the preferred
kind in working and what darcs will get internal respectively.
A filter of "rn/n" would transform lines to end with \r\n
in working and with \n when darcs sees them.  A filter of
"n/rn" would make lines end with \n in working and with \r\n
inside darcs.

This way it can work the other way around too: a group of
windows users creates a repo with all \r\n, and the poor sole
unix developer turns on a "n/rn" filter to not have \r-s in the
working files but still get them there on everything recorded.

While the filter is on it will "hide" real line endings and
limit access to handle them.  Any multi-line-ended files
must be handled with the filter turned off and special tools
that can cope with different line endings, but that's the
case anyway.


-- 
Tommy Pettersson <ptp at lysator.liu.se>




More information about the darcs-devel mailing list