Live data from Hacker News

Shit – An implementation of Git using POSIX shell

git.sr.ht

51–60 of 235 posts

Re: Shit – An implementation of Git using POSIX shell

#51
post #18

This is great, but I already use "shit" as an alias for "fuck".

If there's anything you don't want to confuse, it's your shit and your fuck. Keep them separate, people. Keep them separate.

The world is big enough for everyone's kinks; I'll keep mine off yours and you return the favor tx

Re: Shit – An implementation of Git using POSIX shell

#52

Hiya HN. I was ranting on Mastodon earlier today because I feel like people learn git the wrong way - from the outside in, instead of the inside out. I reasoned that git internals are pretty simple and easy to understand, and that the supposedly obtuse interface makes a lot more sense when you approach it with an understanding of the fundamentals in hand. I said that the internals were so simple that you could implem…

> instead of the inside out

Now the name makes even more sense. I first read it as sh/git, but reading it as something that starts inside and slowly works its way out is now my preferred explanation of the name.

Re: Shit – An implementation of Git using POSIX shell

#53
I once landed a job as a web developer in a marketing department where IT was gatekeeping production hard.

Although all the code was in git (the real git), deployment involved a magical shell script someone in IT had written ages ago. Only after a bunch of rocky, outage-causing deployments did we have the sense to start digging into this magic script.

It turned out it was just a bad, thousands of lines long re-implementation of git using perl and mysql that captured and stored diffs and rsync'd them to production. ...And this was well into the era of CI/CD and infrastructure automation tools.

Eventually, the company brought in new IT leadership that put an end to that kind of nonsense, which freed us in marketing to buy purpose-built PaaS for our needs.

Obviously do this kind of crazy stuff as you please on the side. But at work, build only what uniquely adds value to your company. For most, dev tools are probably pretty low on that list.

Re: Shit – An implementation of Git using POSIX shell

#54

Hiya HN. I was ranting on Mastodon earlier today because I feel like people learn git the wrong way - from the outside in, instead of the inside out. I reasoned that git internals are pretty simple and easy to understand, and that the supposedly obtuse interface makes a lot more sense when you approach it with an understanding of the fundamentals in hand. I said that the internals were so simple that you could implem…

> oh fuck, I didn't realize that the git index is a binary file format

I wonder if the project (or likely, another one) might be better served by implementing the index using plain text (or whatever else might be more natural for shell wrangling) to elucidate the conceptual structure rather than matching git literally.

PS: The name is very apropos. One doesn’t see too many such fitting opportunities — feels warm and fuzzy to see this one well used :-)

Re: Shit – An implementation of Git using POSIX shell

#56
post #18

This is great, but I already use "shit" as an alias for "fuck".

If there's anything you don't want to confuse, it's your shit and your fuck. Keep them separate, people. Keep them separate.

There's a Reggie Watts song about this..

Re: Shit – An implementation of Git using POSIX shell

#57

Earlier quoted context omitted.

You'll use git a hundred times a day, every day, for the rest of your career. It's easily worth the hour it'll take to learn it properly.

Sure, but I also use a mouse. I could learn how the optical mouse works. I have some guesses about it too, but never actually learned the details. But I'm a user of it - it works even if I don't understand exactly how and nobody tells me that I learned using the mouse "the wrong way" because of it.

Yes, and you don't have to spend one hour learning how to push a button.

A version control system is tackling a non-trivial problem. Go learn it properly, otherwise you'll be one of the 'users' that, at best, will be stumped on trivial issues, losing productivity and running to others for help. At worst, you'll be making bad decisions and dragging down your team.

Would you also say that you don't need to learn anything and can just "guess" while working with a programming language?

Re: Shit – An implementation of Git using POSIX shell

#58
post #37
post #14

Isn't this how Git was originally done?

No, git was originally done in C: https://git.kernel.org/pub/scm/git/git.git/commit/?id=e83c51...

It's slightly more complicated than that. The `git` command line itself was done in shell. Initially, `git foo` just ran `git-foo-script`, and then those were also written in shell. But the actual sha1 and packfile stuff was always in C from the beginning.

Source: https://git.kernel.org/pub/scm/git/git.git/commit/git?h=v0.9...

Re: Shit – An implementation of Git using POSIX shell

#60

Earlier quoted context omitted.

If there's anything you don't want to confuse, it's your shit and your fuck. Keep them separate, people. Keep them separate.

The world is big enough for everyone's kinks; I'll keep mine off yours and you return the favor tx

You can have whatever kinks you want, but you can't escape the germ theory of disease.
Post reply on HN