-
Notifications
You must be signed in to change notification settings - Fork 320
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
Re-normalize line-endings in git of all files to Linux style ("\n") #2977
Re-normalize line-endings in git of all files to Linux style ("\n") #2977
Conversation
Some ASCII-files were checked-in into git having windows style line endings (\r\n). This is in general not wanted because it can cause modified files without any difference in git-staging. This change re-normalizes all such files in this repository except for *.bat files which are only used on Windows. To re-normalize line endings of all files use the following command (including dot): git add --renormalize .
I'm wondering how such files ended up in the Git repository with Windows EOLs in the first place. By having a quick look, from what I recall, the original authors have always used a macOS machine and never a Windows machine. @cdietrich @szarnekow do you have a clue? Are we OK to merge this? |
@HannesWell, another curiosity, especially related to #2976 (comment) Do you use a Windows machine? Again, it's just to understand why this problem has always been noticed. |
I cannot give you a definite answer and the causes are probably multifarious. But looking at the git-history of some files I see different authors that either checked in some files with windows line-endings or converted the entire file from linux- to windows-style. Having
Yes I'm on Windows. But if a file is actually checked in with Windows-Style line-ending the conversion to linux-style due to The exact behavior of |
Thx |
Thanks for catching and fixing this, @HannesWell |
Thanks @HannesWell I have the correct version of autocrlf in Windows (true) and in Linux/macOS (input). |
Some ASCII-files were checked-in into git having windows style line endings (\r\n). This is in general not wanted because it can cause modified files without any difference in git-staging.
This change re-normalizes all such files in this repository except for *.bat files which are only used on Windows.
To re-normalize line endings of all files use the following command (including dot):
git add --renormalize .