+/* The current stack of revisions on the graph. */
+static struct rev_stack graph_stacks[3] = {
+ { &graph_stacks[2], &graph_stacks[1], &graph_parents[0] },
+ { &graph_stacks[0], &graph_stacks[2], &graph_parents[1] },
+ { &graph_stacks[1], &graph_stacks[0], &graph_parents[2] },
+};
+
+static void
+reset_rev_graph(struct rev_stack *graph)
+{
+ graph->size = graph->pos = 0;
+ graph->commit = NULL;
+ memset(graph->parents, 0, sizeof(*graph->parents));
+}