[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cygwin on windows, repository on linux, cr/lf problems

From: ai26
Subject: Re: cygwin on windows, repository on linux, cr/lf problems
Date: Sat, 03 Jul 2004 01:11:08 +0200

In a message of Fri, 02 Jul 2004 20:31:31 GMT
Received on Fri, 02 Jul 2004 22:38:13 +0200

Eric Taylor <address@hidden> wrote to address@hidden

>Larry Jones wrote:
>> Eric Taylor writes:
>> >
>> > Is there a way to force line ending conversion? Is this a cygwin problem? 
>> > Or maybe my
>> > ssh connection is causing this?
>> It's probably a cygwin problem -- there's an installation option for
>> whether to use CR/LF or just LF as the default line ending and the
>> default is (incorrectly, in my opinion) just LF.
>That is what I thought, but then all the text programs, like echo, ed, etc.
>create the files with a cr/lf pair, as they should. So, it's somewhere else,
>and what else is  left other than cvs (on both ends), and ssh?

Cygwin tries very hard to be Unix.  It works best if you let it write
text files without the CR.  This is controlled by a mount option to your
disk mounts.  Make all your mounts binmode and you shouldn't have the
problem you describe.  (In binmode all Cygwin tools will only write LF
like they do on real Unix, i.e., fopen(path,"r") is the same as

Enter `mount' to see the current mode.  Change it with umount/mount as
on Unix.  `mount --help' will list the details.  I think you can even
mount the same Windows path twice to different mount points, one in
binmode and one in textmode.  And unlike Unix, the mount points don't
need to exists as directories on disk.  But that isn't recommended.

The problem arises because the Cygwin cvs client always thinks it is on
Unix (irrespective of the mount mode) and therefore does not do CR/LF
conversion.  I don't think the Cygwin cvs client will ever write CR/LF
pairs unless the CR is in the repository (which is usually wrong).


Michael Lemke
Sternwarte Bamberg, University of Erlangen-N├╝rnberg, Germany

reply via email to

[Prev in Thread] Current Thread [Next in Thread]