Skip to content

chore: pin line endings and editor defaults - #50

Merged
kkdev92 merged 1 commit into
mainfrom
chore/text-file-conventions
Aug 30, 2026
Merged

chore: pin line endings and editor defaults#50
kkdev92 merged 1 commit into
mainfrom
chore/text-file-conventions

Conversation

@kkdev92

@kkdev92 kkdev92 commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Adds the two files the repository has been without: .gitattributes and .editorconfig.

Why

Line endings depended on each contributor's git configuration. The repository
stores LF, but with core.autocrlf=true — the default on Windows — a checkout
produces a CRLF working tree. The two then disagree, and any tool that compares
line endings reports differences that are not really there. * text=auto eol=lf
removes that dependency: the working tree is LF everywhere, regardless of how a
contributor's git is configured.

Binary types are marked so git never rewrites them.

.editorconfig states conventions the sources already follow — UTF-8, LF,
two-space indent, a final newline, no trailing whitespace. Editors apply them
without each contributor configuring anything.

No content changes

Everything committed was already LF, so git add --renormalize . produces no
diff. This pull request adds files and changes none.

Adds `.gitattributes` and `.editorconfig`, which the repository has been
without.

`* text=auto eol=lf` makes the checkout independent of each contributor's
`core.autocrlf`. Until now a Windows checkout produced a CRLF working tree
while the repository stored LF, so the two disagreed and any tool that
compares line endings reported differences that were not really there.
Binary types are marked so git never rewrites them.

`.editorconfig` states the conventions the sources already follow — UTF-8,
LF, two-space indent, a final newline, no trailing whitespace — so an editor
applies them without per-contributor configuration.

No file contents change: everything committed was already LF, so
`git add --renormalize` produces no diff.
@kkdev92
kkdev92 merged commit cb49e4c into main Aug 30, 2026
16 checks passed
@kkdev92
kkdev92 deleted the chore/text-file-conventions branch August 30, 2026 02:18
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.

1 participant