]> git.ipfire.org Git - thirdparty/git.git/commit
commit-graph: avoid using stale stack addresses
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 15 May 2025 13:11:47 +0000 (13:11 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 May 2025 20:46:48 +0000 (13:46 -0700)
commitee63d026b407118221aca455a9c4f03a08ecf648
tree4df7ab5c988e0ba02cb9a7aa4b95e2b165e6d920
parentfc451e6ea85310725532cbdbc280f8a56a7ec7df
commit-graph: avoid using stale stack addresses

The code is a bit too hard to reason about to fully assess whether the
`fill_commit_graph_info()` function is called at all after
`write_commit_graph()` returns (and hence the stack variable
`topo_levels` goes out of context).

Let's simply make sure that the stack address is no longer used at that
stage, thereby making the code quite a bit easier to reason about.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit-graph.c