summaryrefslogtreecommitdiff
path: root/t/t6009-rev-list-parent.sh
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <dstolee@microsoft.com>2021-02-02 03:01:22 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-02-01 21:03:36 -0800
commitfde55b0906552537c8cbcbf654f8e9dd64414637 (patch)
tree495174c91dc78a480a2abc0b3bdd8b37c36156cf /t/t6009-rev-list-parent.sh
parentcommit-graph: compute generations separately (diff)
downloadtgif-fde55b0906552537c8cbcbf654f8e9dd64414637.tar.xz
commit-graph: be extra careful about mixed generations
When upgrading to a commit-graph with corrected commit dates from one without, there are a few things that need to be considered. When computing generation numbers for the new commit-graph file that expects to add the generation_data chunk with corrected commit dates, we need to ensure that the 'generation' member of the commit_graph_data struct is set to zero for these commits. Unfortunately, the fallback to use topological level for generation number when corrected commit dates are not available are causing us harm here: parsing commits notices that read_generation_data is false and populates 'generation' with the topological level. The solution is to iterate through the commits, parse the commits to populate initial values, then reset the generation values to zero to trigger recalculation. This loop only occurs when the existing commit-graph data has no corrected commit dates. While this improves our situation somewhat, we have not completely solved the issue for correctly computing generation numbers for mixed layers. That follows in the next change. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6009-rev-list-parent.sh')
0 files changed, 0 insertions, 0 deletions