summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c65a501)
raw | patch | inline | side by side (parent: c65a501)
author | Jonas Fonseca <fonseca@diku.dk> | |
Tue, 12 Sep 2006 16:24:12 +0000 (18:24 +0200) | ||
committer | Jonas Fonseca <fonseca@antimatter.localdomain> | |
Tue, 12 Sep 2006 16:24:12 +0000 (18:24 +0200) |
tig.c | patch | blob | history |
index 8549620769546a21d5f1a90712336025ac063874..0ec81b8874560d9149a3e0e6a60f714f04f29949 100644 (file)
--- a/tig.c
+++ b/tig.c
{ &graph_stacks[1], &graph_stacks[0], &graph_parents[2] },
};
+static inline bool
+graph_parent_is_merge(struct rev_stack *graph)
+{
+ return graph->parents->size > 1;
+}
+
static void
reset_rev_graph(struct rev_stack *graph)
{
for (i = 0; i < graph->pos; i++) {
append_to_rev_graph(graph, line);
- if (graph->prev->parents->size > 1 &&
+ if (graph_parent_is_merge(graph->prev) &&
graph->prev->pos == i) {
separator = '`';
line = '.';
for (; i < graph->size; i++) {
append_to_rev_graph(graph, separator);
append_to_rev_graph(graph, line);
- if (graph->prev->parents->size > 1) {
+ if (graph_parent_is_merge(graph->prev)) {
if (i < graph->prev->pos + graph->parents->size) {
separator = '`';
line = '.';
push_rev_stack(graph->next, graph->rev[i]);
draw_rev_graph(graph);
- if (graph->prev->parents->size > 1 &&
+
+ if (graph_parent_is_merge(graph->prev) &&
graph->prev->pos < graph->prev->size - 1 &&
graph->size == graph->prev->size + graph->prev->parents->size - 1) {
i = graph->prev->pos + graph->prev->parents->size - 1;
i++;
}
}
+
reset_rev_graph(graph->prev);
}