diff options
author | Jeff King <peff@peff.net> | 2023-09-28 00:38:17 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-09-28 07:00:43 -0700 |
commit | 8298b54317772ca28fec2673f59a8c2048552ae6 (patch) | |
tree | cab4d059612168c1169bee8ee510097e55da8798 /builtin/commit-graph.c | |
parent | 7ed76b4eb25f03f3bec6abad219d4dda651fc30f (diff) |
commit-graph: check mixed generation validation when loading chain file
In read_commit_graph_one(), we call validate_mixed_generation_chain()
after loading the graph. Even though we don't check the return value,
this has the side effect of clearing the read_generation_data flag,
which is important when working with mixed generation numbers.
But doing this in load_commit_graph_chain_fd_st() makes more sense:
1. We are calling it even when we did not load a chain at all, which
is pointless (you cannot have mixed generations in a single file).
2. For now, all callers load the graph via read_commit_graph_one().
But the point of factoring out the open/load in the previous commit
was to let "commit-graph verify" call them separately. So it needs
to trigger this function as part of the load.
Without this patch, the mixed-generation tests in t5324 would start
failing on "git commit-graph verify" calls, once we switch to using
a separate open/load call there.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions