Skip to content

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

@Pil0tXia

Description

@Pil0tXia

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions