Ben Fitzgerald
Ben Fitzgerald

Reputation: 803

Defaulting cygwin to use CRLF

I'm using a windows PC and editing files checked out from SVN, which has files checked in using DOS.

I use cygwin and when I either create a new file or patch a file using cygwin binaries the file format is unix. Really I need to always use DOS format for these so my colleagues are not inconvenienced.

Is there any way I can have cygwin use DOS format for say a bash session?

I appreciate I can run unix2dos against such files but this is a pain - I'd rather just have them as DOS to begin with if possible.

Upvotes: 1

Views: 2183

Answers (2)

Emil Vikström
Emil Vikström

Reputation: 91983

You can make SVN do this conversion for you automatically. Check out propset and the eol-style option:

http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.5

This will make the files always have the newline sequence native to the platform on which you checked out the files (i.e., you may get them in LF and the other ones will have the same files with CRLF):

svn propset svn:eol-style native put-your-filenames-here

Upvotes: 2

Phong
Phong

Reputation: 6768

You can choose the UNIX or DOS file format during the installation of cygwin.

Upvotes: 1

Related Questions