summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 61eed81)
raw | patch | inline | side by side (parent: 61eed81)
author | Jonas Fonseca <fonseca@diku.dk> | |
Thu, 14 Sep 2006 01:03:55 +0000 (03:03 +0200) | ||
committer | Jonas Fonseca <fonseca@antimatter.localdomain> | |
Thu, 14 Sep 2006 01:03:55 +0000 (03:03 +0200) |
tig.c | patch | blob | history |
index f3109f641fe8803738938b297bc6c44911fcf26b..34a63580b70bf359ad7f603d51fb45efbe5410b2 100644 (file)
--- a/tig.c
+++ b/tig.c
};
/* Parents of the commit being visualized. */
-static struct rev_graph graph_parents[3];
+static struct rev_graph graph_parents[4];
/* The current stack of revisions on the graph. */
-static struct rev_graph graph_stacks[3] = {
- { &graph_stacks[2], &graph_stacks[1], &graph_parents[0] },
+static struct rev_graph graph_stacks[4] = {
+ { &graph_stacks[3], &graph_stacks[1], &graph_parents[0] },
{ &graph_stacks[0], &graph_stacks[2], &graph_parents[1] },
- { &graph_stacks[1], &graph_stacks[0], &graph_parents[2] },
+ { &graph_stacks[1], &graph_stacks[3], &graph_parents[2] },
+ { &graph_stacks[2], &graph_stacks[0], &graph_parents[3] },
};
static inline bool
static void
update_rev_graph(struct rev_graph *graph)
{
- prepare_rev_graph(graph);
+ /* If this is the finalizing update ... */
+ if (graph->commit)
+ prepare_rev_graph(graph);
+
+ /* Graph visualization needs a one rev look-ahead,
+ * so the first update doesn't visualize anything. */
+ if (!graph->prev->commit)
+ return;
draw_rev_graph(graph->prev);
done_rev_graph(graph->prev->prev);
? view->line[view->lines - 1].data : NULL;
if (!line) {
+ update_rev_graph(graph);
return TRUE;
}