[darcs-users] Line endings opinion poll (with bonus opinion)
Samuel A. Falvo II
sam.falvo at falvotech.com
Sat Oct 30 00:23:16 UTC 2004
On Friday 29 October 2004 09:08 am, Kevin Ollivier wrote:
> >> 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?
There are currently three methods of encoding ASCII text. DOS, Unix, and
MacOS Classic. I don't know if MacOS X uses Unix-style line endings or
MacOS-style endings. Windows systems are schitzophrenic between Unix
and DOS styles in many cases, but seems to prefer DOS over Unix by a
relatively small margin.
This means that darcs would have to be able to somehow detect or store as
metadata which kind of system is in use when a file is initially checked
in, and remember to convert to and from that format as appropriate.
In the interest of making things easier for darcs, I suggest having a
*common* form in which *all* text files take inside the repository,
regardless of which platform darcs is running on. This will make
transferring repositorities between platforms easier. I suggest the
text transmission layout as used by RFC822, for example. Basically,
this is DOS-style, and is the original style recommended by ASCII (heh,
the ONLY standard Microsoft has adopted, it seems). That is, lines end
with CR/LF.
For Darcs running on Unix or MacOS platforms, then, knowing that a file
is plain ASCII, it can convert between its native format and the
standard format effortlessly, without having to worry who the intended
target is. This is a case of supporting N systems through N conversion
routines, instead of N*N-1.
Just my opinion on the subject. I otherwise don't care much. :) Thanks
for reading.
More information about the darcs-users
mailing list