Code

update_rev_graph: move code to prepare_rev_graph
authorJonas Fonseca <fonseca@diku.dk>
Thu, 14 Sep 2006 00:58:23 +0000 (02:58 +0200)
committerJonas Fonseca <fonseca@antimatter.localdomain>
Thu, 14 Sep 2006 00:58:23 +0000 (02:58 +0200)
tig.c

diff --git a/tig.c b/tig.c
index fefec61ee15b1a4d586d4dc7fb81959815fc5774..f3109f641fe8803738938b297bc6c44911fcf26b 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -2824,8 +2824,9 @@ draw_rev_graph(struct rev_graph *graph)
        }
 }
 
-void
-update_rev_graph(struct rev_graph *graph)
+/* Prepare the next rev graph */
+static void
+prepare_rev_graph(struct rev_graph *graph)
 {
        size_t i;
 
@@ -2844,9 +2845,15 @@ update_rev_graph(struct rev_graph *graph)
        /* Lastly, put any remaining revisions. */
        for (i = graph->pos + 1; i < graph->size; i++)
                push_rev_graph(graph->next, graph->rev[i]);
+}
+
+static void
+update_rev_graph(struct rev_graph *graph)
+{
+       prepare_rev_graph(graph);
 
-       draw_rev_graph(graph);
-       done_rev_graph(graph->prev);
+       draw_rev_graph(graph->prev);
+       done_rev_graph(graph->prev->prev);
 }