Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce LF line endings on checkout #8487

Merged
merged 2 commits into from
Nov 29, 2023
Merged

Enforce LF line endings on checkout #8487

merged 2 commits into from
Nov 29, 2023

Conversation

JamieMagee
Copy link
Contributor

@JamieMagee JamieMagee commented Nov 29, 2023

Since #6682 all files in the repository have been normalized to LF. However, when checking out the repository on Windows, and core.autocrlf or core.eol are unset, line endings are set to CRLF. See the documentation1:

If the eol attribute is unspecified for a file, its line endings in the working directory are determined by the core.autocrlf or core.eol configuration variable (see the definitions of those options in git-config[1]). If text is set but neither of those variables is, the default is eol=crlf on Windows and eol=lf on all other platforms.

We should default to a known good configuration, and not depend on people to have the correct git config to.

Footnotes

  1. https://git-scm.com/docs/gitattributes#Documentation/gitattributes.txt-Unspecified-1-1

@JamieMagee JamieMagee requested a review from a team as a code owner November 29, 2023 21:45
@JamieMagee JamieMagee merged commit ba1499d into main Nov 29, 2023
81 checks passed
@JamieMagee JamieMagee deleted the jamiemagee/eol-lf branch November 29, 2023 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants