Hacker News new | ask | show | jobs
by phaemon 4575 days ago
You don't actually know how git implements it, so how can you disagree with it?

There is no such thing as "an edited version" of a commit. A commit is identified by a SHA1 hash of its index of contents. If you change one bit you get a new commit.

You're a C programmer, right? If someone gave you a specification for writing a program to implement git, without telling your what it was, you'd tell them it would take 2 weeks. And that's because you'd reckon it would take 2 hours to knock out a rough version and a couple of days to clean it up.

Seriously, it's that simple. Just go learn how it works.

1 comments

I understand how it works. Of course there's such thing as "an edited version" of a commit: it's a new commit that you create by taking an existing one and altering it. If you want to argue about terminology, please be my guest, but that's all your dispute is.
If you know how it works then where did your last question come from? The bit you're "confused" about?

It's obvious what the answer is if you know how it works, so what was your point exactly?

I know how git works in general. I wasn't 100% clear on the whole garbage collection aspect of it, which is hardly a central feature.

There's a difference between "has no idea how it works" and "understands the overall structure but doesn't know every single detail".