The issue here appears to be that git
is configured as follows (taken from a Windows-based build):
$ git config -l
core.symlinks=false
core.autocrlf=true
...
This feels like the wrong default (https://git-scm.com/docs/gitattributes#_checking_out_and_checking_in) because otherwise there’s a considerable amount of work required to undo this behaviour. If anything, I would suggest making the default false
and then allowing people to configure it to true
in the .travis.yml
git:
section (https://docs.travis-ci.com/user/customizing-the-build/#git-clone-depth)
My current work around is the following addition to my .travis.yml
:
before_install:
- cd ../..
- mv $TRAVIS_REPO_SLUG _old
- git config --global core.autocrlf false
- git clone --depth=50 _old $TRAVIS_REPO_SLUG
- cd $TRAVIS_REPO_SLUG
Edit to fix env var name
Edit to fix error in before_install