Skip to content

Conversation

@Sukuna0007Abhi
Copy link
Contributor

@Sukuna0007Abhi Sukuna0007Abhi commented Jan 11, 2026

Fixes #3545

Summary

This PR adds a .gitattributes file to the repository to prevent Windows CRLF line ending issues that can break Python scripts and shell script entrypoints.

Changes

  • Added .gitattributes file with rules to enforce LF line endings for:
  • Python files (*.py)
  • Shell scripts (*.sh)
  • All text files (default * text=auto)
  • Marked binary files appropriately to prevent line ending conversion

Testing

The .gitattributes file follows GitHub's recommended format for handling line endings. This will prevent Git from automatically converting LF to CRLF on Windows systems, which has been causing issues in WSL and other Windows-based environments.

Related Issues

Resolves #3545

Pls review @sgoggins @MoralCode @cdolfi

Comment on lines +91 to +99
*.exe binary
*.dll binary
*.so binary
*.dylib binary
*.pyc binary
*.pyo binary
*.pyd binary
*.whl binary
*.egg binary
Copy link
Contributor

Choose a reason for hiding this comment

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

a lot of these (from .exe down) are unlikely to be in the repo since many of them are compiled program outputs and wouldnt be checked into git

Comment on lines +78 to +80
# Binary files - ensure they're not modified
*.png binary
*.jpg binary
Copy link
Contributor

Choose a reason for hiding this comment

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

does the automatic behavior account for this already? whats the default behavior?

Comment on lines +30 to +38
*.html text eol=lf
*.htm text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.js text eol=lf
*.jsx text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
*.vue text eol=lf
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to specify every single file type like this given that we assume things are ttext files in the first line?

@MoralCode MoralCode added the redundant PR is submitted in parallel with another mutually exclusive PR label Jan 11, 2026
@shlokgilda
Copy link
Collaborator

@Sukuna0007Abhi There are a couple of other PRs targeting the same issue (#3561, #3562). Could you all please discuss the best way forward and come up with just one PR and close the rest? You can discuss the optimal way forward in the linked issue #3545.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

redundant PR is submitted in parallel with another mutually exclusive PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add .gitattributes file to define how line endings should be handled

3 participants