From 61eed810a92c73bbbaa2b9e83619ad39c6ac5323 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Thu, 14 Sep 2006 02:58:23 +0200 Subject: [PATCH] update_rev_graph: move code to prepare_rev_graph --- tig.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tig.c b/tig.c index fefec61..f3109f6 100644 --- 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); } -- 2.30.2