[darcs-users] Line endings opinion poll (with bonus opinion)
Peter Strand
peter at zarquon.se
Fri Oct 29 09:42:02 UTC 2004
Michael Conrad wrote:
> So, the poll: There are two main camps (I think) on how lines should be
> handled:
> 1: All spacing and formatting and control characters are part of the file,
> and should not be modified by a revision control program. If it were
> modified, it could end up with inconsistent results when copying between
> systems and diffing by hand.
>
> 2: "ASCII Text" is a protocol which different systems speak differently. It
> consists of lines of printable characters which are delimited by
> system-specific control characters. A revision control system should use
> whatever notion of "text" the host operating system uses, and translate
> whenever data comes or goes from the system.
> So, whats everyone's opinion?
#2 as default with support for #1.
(I can live with "#1 with support for #2" as well)
Usually it's preferably to use the system-specific format of text-files,
and I think that it is the revision control system's job to do the
conversion. However, it is sometimes nice to be able use an alternative
format, for example when sharing a filesystem between unix and windows
I usually use unix-encoding for all files.
I have an almost-finished patch to darcs which adds (primitive) support
for windows newlines when reading and writing text files. It basically
just adds a --convert-newlines option to get and then keeps track of the
format for subsequent operations..
I don't know if that is a good interface..?
/Peter
More information about the darcs-users
mailing list