Re:Part of Windows 11 is a revamped Windows Subsystem for Linux
by Mogzol on Sunday October 10, 2021 @01:36AM
(#28816029)
I think one of the main problems is that when you install git for windows, the default setting is to convert LF to CRLF when checking out code. This can cause a bunch of issues if you later try to work with those files within WSL (especially when doing any git-related stuff). I don't really understand why that's the default, or even why it's presented as an option during installation, it's been ages since I actually had issues reading/editing Unix-style files in Windows.
[ Parent
| on HN ]
Re:Part of Windows 11 is a revamped Windows Subsystem for Linux
by mey on Sunday October 10, 2021 @01:48AM
(#28816076)
It is insane to me that git doesn't checkout/in as-is by default on Windows.
Re:Part of Windows 11 is a revamped Windows Subsystem for Linux
by fiddlerwoaroof on Sunday October 10, 2021 @02:04AM
(#28816148)
The biggest gotcha on Mac is using git on the default case-insensitive volume. I always create a separate case-sensitive APFS volume for all my git repos to avoid subtle mismatches between the filename git knows about and the filename macOS knows.
Re:Part of Windows 11 is a revamped Windows Subsystem for Linux
by cerved on Sunday October 10, 2021 @02:54AM
(#28816362)
because of crap like notepad
Re:Part of Windows 11 is a revamped Windows Subsystem for Linux
by stinos on Sunday October 10, 2021 @03:26AM
(#28816486)
I always wondered. Source?
Re:Part of Windows 11 is a revamped Windows Subsystem for Linux
by cerved on Sunday October 10, 2021 @03:49AM
(#28816603)
notepad is the default text editor in windows, it doesn't support Unix line endings until insider build whatever
Re:Part of Windows 11 is a revamped Windows Subsystem for Linux
by zz865 on Sunday October 10, 2021 @09:30AM
(#28818270)
Notepad changed 3 years ago so now this isn't a problem. Git should default everything to LF.
https://devblogs.microsoft.com/commandline/extended-eol-in-n...
Re:Part of Windows 11 is a revamped Windows Subsystem for Linux
by cerved on Sunday October 10, 2021 @11:09AM
(#28818997)
that's a Windows 10 insider build, git for windows presumably wants to be more backwards compatible
just change it to input and be happy
Re:Part of Windows 11 is a revamped Windows Subsystem for Linux
by Mogzol on Sunday October 10, 2021 @04:28PM
(#28821677)
The new notepad version was released to non-insiders in Windows 10 1809, so it's still been around for almost 3 years now. I do understand that git wants to maintain the best compatibility, but at this point I would argue that converting to CRLF on checkout is causing more issues than it solves.
Re:Part of Windows 11 is a revamped Windows Subsystem for Linux
by stinos on Sunday October 10, 2021 @06:12AM
(#28817229)
Sure, but is that really the reason why autocrlf is the default in git?
Re:Part of Windows 11 is a revamped Windows Subsystem for Linux
by cerved on Sunday October 10, 2021 @11:07AM
(#28818985)
it's the default in git-for-windows
I see no other reason that maximum platform compatibility