From: Derrick Stolee Date: Wed, 27 Jun 2018 13:24:39 +0000 (-0400) Subject: commit-graph: verify generation number X-Git-Tag: v2.19.0-rc0~110^2~9 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1373e547f7d38b9444fcaae16c1de698b719aa15?ds=sidebyside;hp=1373e547f7d38b9444fcaae16c1de698b719aa15 commit-graph: verify generation number While iterating through the commit parents, perform the generation number calculation and compare against the value stored in the commit-graph. The tests demonstrate that having a different set of parents affects the generation number calculation, and this value propagates to descendants. Hence, we drop the single-line condition on the output. Since Git will ship with the commit-graph feature without generation numbers, we need to accept commit-graphs with all generation numbers equal to zero. In this case, ignore the generation number calculation. However, verify that we should never have a mix of zero and non-zero generation numbers. Create a test that sets one commit to generation zero and all following commits report a failure as they have non-zero generation in a file that contains generation number zero. Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano ---