Skip to content

Commit 0d11f7d

Browse files
authored
Merge pull request travis-ci#2579 from kortschak/core.autcrlf
Document core.autocrlf control
2 parents b9e36a4 + e697fc2 commit 0d11f7d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

user/customizing-the-build.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,22 @@ git:
175175
where `skip-worktree-map-file` is a path to the existing file in the current repository with data you'd like to put into `$GIT_DIR/info/sparse-checkout` file of [format described in Git documentation](https://git-scm.com/docs/git-read-tree#_sparse_checkout).
176176

177177

178+
## Git End of Line Conversion Control
179+
180+
Travis CI clones repositories with platform-dependent [core.autocrlf](https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreautocrlf) behavior.
181+
This behavior can be modified via the autocrlf attribute in `.travis.yml`. Valid values are `true`, `false` and `input`.
182+
183+
To clone your repository without end of line conversion, add:
184+
185+
```yaml
186+
git:
187+
autocrlf: input
188+
```
189+
{: data-file=".travis.yml"}
190+
191+
This is equivalent to [`git config --global core.autocrlf input`](https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreautocrlf) prior to cloning the repository.
192+
193+
178194
## Disabling git clone
179195

180196
In some workflows, like [build stages](https://docs.travis-ci.com/user/build-stages/#what-are-build-stages), it might be beneficial to skip the automatic `git clone` step.

0 commit comments

Comments
 (0)