From 6d76e4e92910f2b52ed96c5626641b5283ca9ea4 Mon Sep 17 00:00:00 2001 From: kkdev92 <112151103+kkdev92@users.noreply.github.com> Date: Sun, 30 Aug 2026 11:07:31 +0900 Subject: [PATCH] chore: pin line endings and editor defaults MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .editorconfig | 18 ++++++++++++++++++ .gitattributes | 13 +++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitattributes diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..e5f596d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 + +[Makefile] +indent_style = tab diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b31a5ab --- /dev/null +++ b/.gitattributes @@ -0,0 +1,13 @@ +# Normalize all text files to LF in the repository and in the working tree. +# Without this, `core.autocrlf=true` on Windows checks files out as CRLF, so the +# working tree disagrees with what is committed and any tool that compares line +# endings reports differences that are not really there. +* text=auto eol=lf + +# Binary files git should never touch. +*.png binary +*.jpg binary +*.gif binary +*.ico binary +*.vsix binary +*.tgz binary