From bb7b663dafdf415c2902bffb9d3dadd695e9a004 Mon Sep 17 00:00:00 2001 From: Diomendius <42310725+Diomendius@users.noreply.github.com> Date: Wed, 31 Jul 2024 17:31:51 +1200 Subject: [PATCH] Add .gitattributes The line endings of text files in this repo are not consistent and some files even have mixed line endings, presumably from being edited with an editor that neither respects a file's existing EOL format nor converts existing line endings on save. This commit adds a .gitattributes file to mark most text files as text in Git, which will cause Git to normalize the line endings in these files to LF internally and to the format specified by the core.eol setting for files in the working tree. This commit only adds .gitattributes and does not change line endings. The following commit normalizes all line endings for files given the `text` attribute by this commit. --- .gitattributes | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..844e4ae --- /dev/null +++ b/.gitattributes @@ -0,0 +1,31 @@ +.editorconfig text +.gitattributes text +.gitignore text +.gitmodules text + +*.txt text + +*.cmake text +Makefile text +README text + +*.bat text eol=crlf + +*.c text +*.cpp text +*.h text +*.mm text + +*.gradle text +*.java text +*.mk text + +*.xml text +*.html text + +*.json text + +# These files get packaged into ApplicationResources.gpf, so ensure +# they get consistent line endings for reproducibility. +/ApplicationResourcePatches/**/*.json eol=lf +/ApplicationResourcePatches/**/*.txt eol=lf