From 6f2c3004336be746559576b60b193f6e514e3dab Mon Sep 17 00:00:00 2001 From: dcode Date: Mon, 7 Oct 2024 16:47:09 +0200 Subject: [PATCH] Enforce LF line endings The repository contains various Bash scripts that rely on LF line endings to function, not all of them with an .sh suffix. To prevent issues due to a mismatch of line endings on Windows, conservatively enforce that text files are checked out as-is (with LF). --- .gitattributes | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..039b4bb63 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# On Windows, Git defaults to checkout Windows-style and commit Unix-style. +# As such, line endings of bash scripts are converted from LF to CRLF, with +# the effect that when mounting the checkout into a Linux container, the +# bash scripts can't execute because bash does not handle CR. To mitigate, +# conservatively force ALL line endings to be retained. +* -text