2 ms·
> But git was written assuming a posix shell and it shows up here and there sadly. Given that the entire point of POSIX is cross platform compatibility, this i
by stephenr 2y ago
> But git was written assuming a posix shell and it shows up here and there sadly.
Given that the entire point of POSIX is cross platform compatibility, this is one of the few times when I will say they (Linus/git) got it 100% right.
> Should be possible for git to simply interpret sequentially.
Simply? What should it do if the first command fails? Should it exit early? What if you want it to run the second only if the first returns error? What if you want to pipe the first to the second? Or use it as an argument?
Aliases have a "simple" mode where they call exactly one thing. Anything beyond that can't be simple, without also being useless.
If Microsoft can't ship a POSIX compatible shell that's on them, and if you insist on using an OS that doesn't have a POSIX compatible shell, that's on you.
I don't start Linux and ask why it doesn't run whatever people use Windows for... malware I assume?
- alkonaut 2y ago> Simply? What should it do if the first command fails? Should it exit early? What if you want it to run the second only if the first returns error? You’d eventually reinvent a shell. But for just these 2 cases you’d just need 2 separators analogous to the & and && of the shell. But yeah it gets messy if you wanted to run a non git command in the middle. The thing is, all those !a && b are perfectly valid in both posix and cmd. It just refuses to do the whole “if it starts with ! call the shell”. I guess all that’s missing is that it just needs to execute it. That would probably be the less complicated change. That at least doesn’t seem like a big controversial addition (maybe this is already done now it was a couple of years since I tried and hit a brick wall with aliases under cmd)