[cvsnt] how to disable line ending translations?
arthur.barrett at march-hare.com
Thu Oct 23 09:21:13 BST 2008
> The problem happens when I want to commit file (that file is
> a patch) with
> crlf line endings but cvsnt converts that to lf thus breaking
> the patch file.
> Now you could ask why the patch has crlf line endings inside.
> That's because
> source files that the patch is going to be applied to have
> crlf line ending
Well aside from the whole question of why you are committing a .patch
rather than applying a patch and committing the changed file...
'Typically' a file on windows has CRLF line endings and a file on linux
has LF line endings. So if you were a 'typical' user I'd recommend you
dos2unix the patch before committing the file on linux and then checkout
the patch and the file on windows and they will both have the same line
> What I'm trying to archieve is to stop cvsnt from doing any
> line ending
> conversions "by default" because it has no way to know when
> such conversion
> is sane and when it's not.
Again - the conversions are set up for a 'typical' user and it is sane
(and safe) to assume that on windows files have cr+lf but on linux they
If the file you are committing is 'new' then just do this:
cvs add -kD filename.ext
cvs commit -m "this file will always have windows line endings"
If the file was previously added as having 'default' line endings:
cvs update -kD filename.ext
<copy the 'new' filename.ext over the old one now>
cvs ci -f -m "force new line endings" filename.ext
More information about the cvsnt