Skip to content

Enforce LF line endings on checkout#8487

Merged
JamieMagee merged 2 commits intomainfrom
jamiemagee/eol-lf
Nov 29, 2023
Merged

Enforce LF line endings on checkout#8487
JamieMagee merged 2 commits intomainfrom
jamiemagee/eol-lf

Conversation

@JamieMagee
Copy link
Copy Markdown
Member

@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 enabled auto-merge November 29, 2023 21:47
@JamieMagee JamieMagee merged commit ba1499d into main Nov 29, 2023
@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