From 857df933cbef047bcf5e467b1e49432647df996e Mon Sep 17 00:00:00 2001 From: Micah Snyder Date: Sat, 10 Jul 2021 12:33:16 -0700 Subject: [PATCH] Windows: Prevent git from changing line endings on test files The sample3.ref test file is plain ascii, which means that Git on Windows will automatically convert the line endings from \n to \r\n. This of course causes a test to fail. Added a .gitattributes file that requires Git to treat *.ref files as binary, so it won't convert line endings. --- .gitattributes | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..2253303 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,16 @@ +# Handle line endings automatically for files detected as text +# and leave all files detected as binary untouched. +* text=auto + +# +# The above will handle all files NOT found below +# + +# Files that should be left untouched (binary is macro for -text -diff) +*.ref binary + +# +# Exclude files from exporting +# +.gitattributes export-ignore +.gitignore export-ignore