Allow changing git autocrlf setting

giggio's Avatar

giggio

26 Nov, 2014 12:19 PM

I read on another thread (http://help.appveyor.com/discussions/problems/671-coreautocrlf) the default configuration for the git autocrlf setting is "input". This means AppVeyor is checking out files with LF (\n) endings on Windows. That broke some of my tests.
Is there any way to configure it?
I added
* eol=crlf
To my .gitattributes file, but our project is cross platform, and this will actually check out CRLF even on Mac or Linux, what is wrong. I would like to be able to define this before you clone, but I could not find a script to run before the clone. I could globally define on git if I had the chance to do something before the cloning happens. But a actual setting should be better.
I would like to know why you decided that LF for Windows was the best option?
Thanks!

  1. Support Staff 1 Posted by Feodor Fitsner on 26 Nov, 2014 06:31 PM

    Feodor Fitsner's Avatar

    Hi Giovanni,

    You can change git settings during init phase of the build which comes before repo cloning: http://help.appveyor.com/discussions/problems/948-tests-fail-on-app...

  2. 2 Posted by giggio on 26 Nov, 2014 06:39 PM

    giggio's Avatar

    Hi Feodor,
    Thank you for your answer.
    Is there any way I can do that without having to create a appveyor.yml file?

  3. Support Staff 3 Posted by Feodor Fitsner on 26 Nov, 2014 06:41 PM

    Feodor Fitsner's Avatar

    I'm afraid there is no such setting on UI yet though this is something that could be easily added.

  4. 4 Posted by giggio on 26 Nov, 2014 06:48 PM

    giggio's Avatar

    I think that both the init script and the CRLF options would be nice. And I think that the default value should be `auto`, as those are windows boxes. It caught us by surprise that the source files were being checkout out with the LF end of line.

  5. Support Staff 5 Posted by Feodor Fitsner on 26 Nov, 2014 07:03 PM

    Feodor Fitsner's Avatar

    Last time changing this setting system-wide caused a lot of noise :)
    Imho, checking out files with endings as they are originally stored is safer in most cases...

    Will add "Init" section on UI.

  6. Support Staff 6 Posted by Feodor Fitsner on 28 Nov, 2014 07:57 PM

    Feodor Fitsner's Avatar

    Now it's possible to configure "Init" scripts on Environment tab of project settings.

  7. 7 Posted by giggio on 28 Nov, 2014 11:16 PM

    giggio's Avatar

    Thanks a lot! That allowed me to remove my crlf setting from my .gitattributes. And my build is passing!

    https://ci.appveyor.com/project/code-cracker/code-cracker/build/1.0.0.94

  8. giggio closed this discussion on 29 Dec, 2014 03:23 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac