Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ensure shell scripts and patch files always use LF line endings.
# Required for correct execution in Linux containers; Windows may use CRLF.
*.sh text eol=lf
*.patch text eol=lf
Comment on lines +1 to +4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While specifying line endings for *.sh and *.patch files is a good start, this line ending issue can affect many other text-based files in a cross-platform project (e.g., Makefile, Dockerfile, source code files). To create a more robust and future-proof solution, it's better to set a default rule for all text files.

Using * text=auto eol=lf will automatically handle line endings for all files that Git detects as text, which is a common best practice for repositories with contributors on different operating systems.

# Normalize all text files to use LF line endings.
# This prevents cross-platform issues with files like scripts, Makefiles,
# and Dockerfiles when working in mixed OS environments.
* text=auto eol=lf