remove Change end_of_line rule in .editorconfig to avoid confusion with CRLF <-> LF conversions on Linux dev environment#319
Conversation
|
I believe it is operating system dependent. I'm on Windows and when I open various files in Notepad++, which is capable of showing line endings, and I see CRLF all across the files and even before we switched to git we had CRLF endings in actual files. As I remember we changed git settings to have auto endings to be more friendly to non-windows operating systems. So no, no switching of end of line globally. |
|
Git settings are individual BTW we had a lot of pain until forced LF endings. |
When I clone dotnet/aspnetcore repo and went through some files I see CRLF everywhere. For example, src/Mvc/Mvc.Core/src/ForbidResult.cs which was edited within few weeks has no line ended with LF on my machine. If they had switched to LF I would've seen at least some LFs. I also cloned dotnet/sdk. There is a file with path sdk/src/Tests/Microsoft.DotNet.ApiCompat.Tests/RegexStringTransformerTests.cs which was updated 2 weeks ago. No LFs found as well, all endings are CRLF. I also have checked the history of When you, on your Unix-based PC clone the repos above you will have LF ending in files across the board. This made you think that they have LF as default setting, but they don't. Same happened with this repo, you thought that we had LF endings because GIT did its trick. According to current settings of GIT of this repo, windows clients will always have CRLF and Unix clients will always have files with LF. Now I work with files with native endings but you don't. If we changed ending to LF then I would suffer from this (along with all windows git clients) and you wouldn't. So, by this PR you don't solve the issue, you just move pain from your neck to mine, that's it. Why should I allow this happen? Timewise I work with the project more. All our infrastructure is windows-based, so I should take my chances of having something going wrong and possibly create some issues for me to resolve, right? No. I have to think carefully because for you it is one-line change and for me it is possibly several days of overcoming some problems which could appear. The proof of my point about operating system based endings is Npgsql repo. They have the same "* text=auto" setting for git as we have and "end_of_line = LF" in Potentially, removing of explicit I strongly recommend you discuss any change of settings of GIT, formatting (or any other setting that could potentially harm other people working with the repo) before making them, otherwise I will reject such pull-requests without having to explain the reason as I have to do now. Because it took a lot of time to prove my point for you, several hours, actually, to search, collect and compose information in form of this detailed answer. |
Probably your Git client converts BTW
GIT did its trick ONLY for windows, and REAL ending is LF.
I think it would be better to disable Git to do conversion by And even having |
It was done so because before it became open-source it was private project when everyone worked on windows so all the sources were with CRLF endings. This setting kept us, actual team, from having possible troubles (if they appear, we all know that software is sometimes unpredictable in the issues it delivers when it is important to work properly).
Well, I didn't know that it stores LF, obviously it uses something as end-of-line symbol, it could be some replacer, easily. Now I know, thanks to you.
No, it will lead to all files' modification. I have experienced it already. Don't want it again. It works now. I think we'll be just fine if we remove |
No need for all files conversion, they are already LF Right now |
|
The point of git attributes and editor config is to unify all the developers and contributors by settings. This is reasonable because it prevents personal settings having affect on the project. I agree that you can remove the line about |
|
Or I can pass the change from |
.editorconfigChange end_of_line rule in .editorconfig to avoid confusion with CRLF <-> LF conversions on Linux dev environment
Removed the rule |
Source code in the repository actually has LF ending
No need to force VS insert CRLF, and then convert it by git during commits