commit-graph: create write_commit_graph_context
commitc9905beade13efff6be9c15ebe03d07fe5278ccc
authorDerrick Stolee <dstolee@microsoft.com>
Wed, 12 Jun 2019 13:29:40 +0000 (12 06:29 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Jun 2019 18:20:53 +0000 (12 11:20 -0700)
tree3cb8463353a28d3f63a67ce46420153c24b188b1
parent10bd0be173b0ab9a9255fc15a768b2518d3eba57
commit-graph: create write_commit_graph_context

The write_commit_graph() method is too large and complex. To simplify
it, we should extract several helper functions. However, we will risk
repeating a lot of declarations related to progress incidators and
object id or commit lists.

Create a new write_commit_graph_context struct that contains the
core data structures used in this process. Replace the other local
variables with the values inside the context object. Following this
change, we will start to lift code segments wholesale out of the
write_commit_graph() method and into helper functions.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit-graph.c