[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Poll: do we really need newline conversion?

From: Mark Benedetto King <bking_at_answerfriend.com>
Date: 2001-12-11 19:07:22 CET

On Tue, Dec 11, 2001 at 09:45:13AM -0800, Billy Tanksley wrote:
> >Karl Fogel <kfogel@newton.ch.collab.net> writes:
>
> >> Recently, some people posted asking whether Subversion should even
> >> bother to perform newline conversion.
> >> Would like to know what other people think...
>
> Sorry -- I replied to the author instead of the list. I'm +1; definitely
> don't want newline conversion.
>

I'm also +1, but I do have a horror story.

> I also want to hear the other side of the story -- we've told horror stories
> about how newline conversion has burned us personally, and it's obvious how
> it can cause problems in binaries -- but there MUST be some reason why
> people ask for it. There MUST be some use! Can someone step forward and
> give us a horror story of what happened to them when their version control
> system failed to translate line endings?
>

The argument that "editors should handle line separators" only goes
so far. There are other consumers of text files. In particular, the
"binfmt_misc" loader for linux, does The Wrong Thing.

This means that bash scripts written under cygwin do not work under
linux without newline conversion.

$ echo -ne '#!/bin/bash\necho foo\n' > foo; chmod 755 foo; ./foo
foo

$ echo -ne '#!/bin/bash\r\necho foo\r\n' > foo; chmod 755 foo; ./foo
bash: ./foo: No such file or directory

The whole "#!" interface is evil, anyway, and helps people write broken
code ("oh, perl isn't in /usr/bin on every system?"). Maybe *not*
supporting newline conversion will help people to *not* use #!. :-)

--ben

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:52 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.