From 22ec883d58322d4e088595bba71db90a44e12d6c Mon Sep 17 00:00:00 2001 From: tison Date: Fri, 19 Jun 2026 02:20:07 +0800 Subject: [PATCH 1/2] Update .gitattributes for new file types See https://github.com/apache/datasketches-rust/pull/92#issuecomment-4743982760. I don't know if it works but it should at least do no harm. --- .gitattributes | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..020f829e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,42 @@ +# The default behavior, which overrides 'core.autocrlf', is to use Git's +# built-in heuristics to determine whether a particular file is text or binary. +# Text files are automatically normalized to the user's platforms. +# 15 years ago this was probably OK, but today it is a bad idea. +* text=auto eol=lf + +# Explicitly declare text files that should always be LF +.asf.yaml text eol=lf +.gitattributes text eol=lf +.gitignore text eol=lf +git.properties text eol=lf +LICENSE text eol=lf +NOTICE text eol=lf +*.html text eol=lf +*.hpp text eol=lf +*.cpp text eol=lf +*.sk text eol=lf +*.md text eol=lf +*.properties text eol=lf +*.sh text eol=lf +*.xml text eol=lf +*.yml text eol=lf +*.yaml text eol=lf +*.txt text eol=lf +GettysburgAddress.txt text eol=lf + + +# Declare files that will always have CRLF line endings on checkout. +# Windows batch scripts strictly require CRLF +*.bat text eol=crlf +*.cmd text eol=crlf + +# Explicitly denote all files that are truly binary and should not be modified. +*.jpg binary +*.png binary +*.svg binary + +# Declare files that should be ignored when creating an archive of the git repository +.asf.yaml export-ignore +.gitattributes export-ignore +.gitignore export-ignore +.github/ export-ignore From 58344f31e97c269b5cf253828327bdc5fe91ced2 Mon Sep 17 00:00:00 2001 From: tison Date: Fri, 19 Jun 2026 13:09:58 +0800 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .gitattributes | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.gitattributes b/.gitattributes index 020f829e..43b37dbc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,14 +1,11 @@ -# The default behavior, which overrides 'core.autocrlf', is to use Git's -# built-in heuristics to determine whether a particular file is text or binary. -# Text files are automatically normalized to the user's platforms. -# 15 years ago this was probably OK, but today it is a bad idea. +# Override 'core.autocrlf' while still using Git's built-in heuristics to detect text vs binary. +# Normalize all text files to LF line endings on checkout. * text=auto eol=lf # Explicitly declare text files that should always be LF .asf.yaml text eol=lf .gitattributes text eol=lf .gitignore text eol=lf -git.properties text eol=lf LICENSE text eol=lf NOTICE text eol=lf *.html text eol=lf @@ -22,7 +19,6 @@ NOTICE text eol=lf *.yml text eol=lf *.yaml text eol=lf *.txt text eol=lf -GettysburgAddress.txt text eol=lf # Declare files that will always have CRLF line endings on checkout.