Add .gitattributes for consistent line ending handling#1063
Add .gitattributes for consistent line ending handling#1063AndyBodnar wants to merge 1 commit intooss-aspen:mainfrom
Conversation
|
Hello, thanks for the PR. Would you be able to join the CHAOSS Slack #wg-augur-8knot channel? i had some questions for you and the contributors of the other PRs for this same thing |
.github/workflows/linting.yml
Outdated
| dockerfile: "./docker/Dockerfile*" | ||
|
|
||
| run-python-lint: | ||
| name: python-lint | ||
| permissions: write-all | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: dciborow/[email protected] | ||
| with: |
There was a problem hiding this comment.
This PR includes changes that are from other PRs. Can you please update it so it only contains the fix you are proposing?
|
I think you should use a rebase for it, and I closed my pr as I said in slack @AndyBodnar |
Cross-platform projects often run into issues with Git auto-converting line endings differently on Windows vs Linux. This causes unnecessary diffs and can break shell scripts or Dockerfiles. This adds a .gitattributes file that: - Normalizes line endings automatically on checkout - Forces LF for Python, shell scripts, and Docker files - Forces CRLF for Windows batch files - Marks binary files to prevent corruption Fixes the line ending inconsistencies reported in the project.
12e3440 to
64b25e7
Compare
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Rebased the branch - it now only contains the .gitattributes file as intended. Sorry about the mess before, my branch had gotten tangled up with other upstream changes. Single commit, single file. Ready for review whenever you get a chance. |
Summary
.gitattributesfile to ensure Python files always use LF line endingsChanges
.gitattributeswith rules for:*.py) - always LF*.sh) - always LF*.bat,*.cmd) - always CRLF (Windows-native)Test plan
Fixes #1062