Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Shell scripts should preserve LF line endings #4686

Closed
3 tasks done
Pil0tXia opened this issue Dec 26, 2023 · 0 comments · Fixed by #4687
Closed
3 tasks done

[Enhancement] Shell scripts should preserve LF line endings #4686

Pil0tXia opened this issue Dec 26, 2023 · 0 comments · Fixed by #4687
Labels
enhancement New feature or request

Comments

@Pil0tXia
Copy link
Member

Search before asking

  • I had searched in the issues and found no similar issues.

Enhancement Request

When cloning a repository with Git on Windows, all text files with Unix-style LF line endings are replaced with Windows-style CRLF line endings, including shell scripts that require LF line endings.

By using .gitattributes, the original LF line endings of shell scripts can be preserved, avoiding the need for secondary conversion when using WSL/Docker Desktop, and enabling developers to build binary packages/Docker images on Windows that can run on Linux systems.

Describe the solution you'd like

Reference: https://code.visualstudio.com/docs/remote/troubleshooting#_resolving-git-line-ending-issues-in-wsl-resulting-in-many-modified-files

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@Pil0tXia Pil0tXia added the enhancement New feature or request label Dec 26, 2023
@mxsm mxsm closed this as completed in #4687 Jan 6, 2024
mxsm pushed a commit that referenced this issue Jan 6, 2024
* crlf2lf

* convert sh only

* write easily

* Some doc optimization

* minor code change

* add future win scrpts

* add license
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant