Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Looking at the diff, it seems like a generation number is just a number the parents that a commit has. For example:

Commit a553af has no parents, it has generation number of 0.

Commit c464e0 is the next commit, it has generation number 1.

And so on. Branches count independently of one another. When commits have multiple parents (e.g. merges), the generation number starts counting from the previous maximum.



  > just a number the parents that a commit has
It's the max length from a commit to reach a root node in the graph. So any time that you hit a fork in the path you take the longest route.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: