Git Commit Generation Numbers
There’s an interesting discussion of Linus Torvalds’ proposed patch to change Git’s commit object format (via Hacker News):
And I have to say, with six years of git use, I think it’s not a coincidence that the notion of generation numbers has come up several times over the years: I think the lack of them is literally the only real design mistake we have.
Now, if may turn out that we’d want to have some cache for generation numbers in commits that don’t have them, but I absolutely think that that should be a “add-on” rather than anything fundamental. For example, if we just merge the “add generation numbers to the commit object” logic first, then the “cache” case never really needs to care about us generating new commits. They simply won’t need the cache.