Re: CVS->GIT with CRLF eols in the GIT repository

Michael Haggerty <[email protected]> Fri, 08 Nov 2013 21:54:24 -0800
Newsgroups gmane.comp.version-control.subversion.cvs2svn.user
Message-ID <[email protected]>
On 11/05/2013 10:18 AM, Gh Savulescu wrote:
> I have a question about how to convert a "regular" CVS repository to a less
> "regular" GIT one. I am using cvs2git version 2.4.0 on Windows.
>
> The source CVS repo has all files properly marked text-or-binary. Text files
> are stored with LF line endings in the "*,v" files, and are checked out with
> CRLF eols.
>
> The less "regular" requirement for the GIT destination repo is to have
> core.autocrlf=false, no .gitattributes (nor .git/info/attributes), yet have
> text files checkout with CRLF line endings. For this, I suppose I need to
> have those files stored with CRLF eols in the GIT repository itself.
>
> So, the question: can I convince cvs2git to store text files in the
> destination GIT repo with CRLF eols as they are in a CVS checkout, and not
> with LF as they are in the source "*,v" files? If yes, how?   [...]

How cvs2git handles line endings is very flexible if you are willing to 
do some manual configuration.  Check out the following documentation:

     doc/properties.txt
     doc/text-transformations.txt

I guess you'll want to set _eol_fix to '\r\n' on the files in question, 
for example by using --auto-props=FILE (or an AutoPropsPropertySetter). 
  I believe that to use this facility you will have to --use-cvs or 
--use-rcs as opposed to --use-external-blob-generator.

Some experimentation might be needed, but I think you can accomplish 
what you need.

Michael

-- 
Michael Haggerty
[email protected]
http://softwareswirl.blogspot.com/

------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1670&dsMessageId=3068153

To unsubscribe from this discussion, e-mail: [[email protected]].