EAP 10455 Git plugin and line breaks

It appears that when the server pulls from git to do a build, it converts CRLFs to just LFs.  Is there a way I can configure the git plugin to not do this?  The reason I ask is because I have a config file getting copied over during the build and I want it to retain CRLF line breaks.

1 comment
Comment actions Permalink

Actually git plugin for teamcity does not converts crlf at all. The files are used in the way they are stored. So currently the plugin behaves as if core.autocrlf property has not been set for repository. You could create an issue in tracker to allow specifying crlf policy for the files.

You could do the following with the file (assuming that you need crlf on all platforms):

1. Create .gitattributes file in the directory where the the file is stored with text like the following:

name-of-file.cfg -crlf

2. Ensure that file on the disk has correct line separators.
3. Commit the file and .gitattribtes into the repository

After that the file should be checked out on the server with crlf line separators.


Please sign in to leave a comment.