commit-graph.c: prevent overflow in `split_graph_merge_strategy()`
commit19565d093d248ba4c2330d96314a547feed41112
authorTaylor Blau <me@ttaylorr.com>
Wed, 12 Jul 2023 23:38:11 +0000 (12 19:38 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Jul 2023 16:32:03 +0000 (14 09:32 -0700)
treece0b225223beedb53dc6243b72a636bd0b8b9185
parent51c31a6408c1eae3ad6c2f78ec136c1b415cad72
commit-graph.c: prevent overflow in `split_graph_merge_strategy()`

In a similar spirit as previous commits, ensure that we don't overflow
when choosing how to split and merge different layers of the
commit-graph.

In particular, avoid a potential overflow between `size_mult` and
`num_commits`, as well as a potential overflow between the number of
commits currently in the merged graph, and the number of commits in the
graph about to be merged.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit-graph.c