Live data from Hacker News

WSL2 corrupting Git repositories and shell history

github.com

191–200 of 423 posts

Re: WSL2 corrupting Git repositories and shell history

#191

Earlier quoted context omitted.

The thing is 99% of what I get elsewhere does actually work properly. Microsoft are just excessively bad at this.

Wow, you're quite lucky, because everything I use has bugs and edge cases.

No luck. I look for things where people aren’t complaining and use those.

Re: WSL2 corrupting Git repositories and shell history

#192
post #166

> Mind that I come from a Ubuntu distro, Windows is the most energy efficient solution at the moment and allows me to run my Dev tools and work on battery for 4 hours straight. Ubuntu (or any Debian-based distro) destroy my battery in 40 minutes and there's no solution or optimization for that. I know this is not a solution, but the Librem laptops from Purism hold up for hours straight. I also used to run Windows on…

I quadrupled battery life when I switched form Windows to Ubuntu. No idea why. I'm using a Dell XPS 15 which has factory support for Linux. I didn't do a lot of digging into why... was just happy to be able to go 4 hours instead of one.

Re: WSL2 corrupting Git repositories and shell history

#193
post #69

I think calling it WSL2 was a mistake. The predecessor, WSL, "just worked" and it was more a less a linux experience for most practical purposes-- and certainly better than hoary old cygwin. This caused a lot of people to believe they could just transition to WSL2, lead on by the promise of an even more performant linux experience. The documentation didn't say anything about complications from attempting this, so a l…

I don't think calling it WSL2 was a mistake. It wasn't something that was good for the users, but it had a very clear benefit for the people working on WSL: calling it WSL2 allowed them to close WSL1 issues en masse as "fixed in WSL2" and never look at them again.

Did they really do that? MS's official line is that WSL is not deprecated, and can be run alongside WSL2.

Re: WSL2 corrupting Git repositories and shell history

#195
post #185
post #177

Earlier quoted context omitted.

This is data loss. A few object files in the Git directory are truncated. Which results in a corrupted repository, from Git's point of view.

That’s corruption. Data loss would indicate an entire fs transaction getting dropped entirely - but not breaking the principle of atomic ops. A write should either happen entirely or not at all.

Does git actually attempt to write all objects atomically?

Re: WSL2 corrupting Git repositories and shell history

#196

Earlier quoted context omitted.

What is inadequate about Libre Office ?

Calc is really not an adequate substitute for Excel if you need to use VBA macros - which might be coming from your customers! And in the wild I see plenty of older Excel documents (before 97) which I don’t think are compatible with LibreOffice. Obviously this isn’t an ideal situation but historical data around prices/etc from the 90s are often stored as old Excel binaries. In general I think using Calc (or Google Sh…

Calc has several options for languages to use for macros, for instance Python – I'm not certain about VBA support, but it would seem that many industries are slowly migrating to Python anyway :

https://news.ycombinator.com/item?id=25588720

Re: WSL2 corrupting Git repositories and shell history

#197

> Feel like booting Linux on a separate disk because of these issues. It always seemed strange to me that people would rather use WSL than the real thing when Windows doesn't bring much advantage. What am I missing ?

You are missing Office, Outlook, Visual Studio, and any enterprise nonsense IT requires on company computers. All of that requires Windows.

I get most of that running a Windows VM inside Linux. Granted, if there's enterprise IT involved there's no escape.

Re: WSL2 corrupting Git repositories and shell history

#198
While we're on the topic of WSL2 causing issues, I will add one that I noted to the pile. If you have WSL2 installed then the first bash on PATH is the WSL2 version of bash. For whatever reason, this version of bash has a major impedance mismatch with Emacs and org-mode. From windows native Emacs (not an Emacs installed in WSL2) if you try to run an org babel block that contains bash code, whole commands will simply be ignored. The end result is that if you blindly execute bash blocks in Emacs on windows without checking which bash is being used there can be disastrous results because a seemingly safe script like `pushd some-folder; rm -r ; popd` suddenly becomes `rm -r ` without warning. I'm guessing that it has to do with mismatched line endings since mingw bash (aka git bash) doesn't have these issues. Also, you can't rely on the ordering of your PATH environment variable to protect you because updates can change it.

tl;dr WSL2 bash is not bash but it pretends to be and there are terrifying changes to the semantics of bash scripts as a result.

Re: WSL2 corrupting Git repositories and shell history

#200

> Feel like booting Linux on a separate disk because of these issues. It always seemed strange to me that people would rather use WSL than the real thing when Windows doesn't bring much advantage. What am I missing ?

My work PC with Office on it.
Post reply on HN