commit-graph: introduce `commit_graph_generation_from_graph()`