Hacker News new | past | comments | ask | show | jobs | submit login

> Your view on commit is a logical set of changes. Git's view is state of the repository.

No, my view of a commit is not a logical set of changes. It's everything that would be in my worktree if I checked out the commit. Which is neither merely the changes from the previous commit(s), nor the entire history leading to the current commit.




But git already has this object, it’s called a tree and each commit has a unique tree associated with it. The commits are the object that carries history and metadata on top of the trees. Is your objection that the commit metadata is associated to the commit and not the tree?


To a first approximation, yes, I think that captures the general idea.

But I don't think it's literally as simple as just taking the commit metadata and slapping it onto the tree objects.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: