Skip to content

Commit

Permalink
Enforce LF line endings
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
dcodeIO authored Oct 7, 2024
1 parent bbf4dc9 commit 6f2c300
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6f2c300

Please sign in to comment.