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.
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.