You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This does the same as setting `core.autocrlf=false` via `git config` or a Git configuration file, but in a manner that
allows that configuration to be distributed, rather than each contributor having their own settings.
The immediate motivation for adding this file is as a workaround for a bug in the "actions/setup-python" action which
causes it to fail spuriously when pyproject.toml is used as the Python versioning source and that file has CRLF line
endings:
```text
Error: Control characters (codes < 0x1f and 0x7f) are not allowed in comments, use \u000d instead at row 10, col 34, pos 211:
9:
10> # Integration tests dependencies.
^
11: invoke = "^2.2.0"
```
The GitHub Actions Windows runners hosted by GitHub have `core.autocrlf=false` in their Git configuration, which causes
the "actions/checkout" action step in a workflow to convert the repo's LF line endings to CRLF if the workflow runs on a
Windows runner.
A fix for the "actions/setup-python" action bug has already been made, so this would no longer be a problem once the
next release of the action comes out. However, the conversion of line endings by Git is utterly pointless because any
tool suitable for development work will have absolutely no problem working with LF line endings. The files in the
project have the line endings they do for a reason and Git should not ever modify them. So the addition of this file has
the ongoing benefit of ensuring Git won't be configured for the annoying and potentially harmful line ending conversion
on the contributor's machine.
0 commit comments