Code

More cleanups
authorJonas Fonseca <fonseca@diku.dk>
Tue, 12 Sep 2006 11:34:21 +0000 (13:34 +0200)
committerJonas Fonseca <fonseca@antimatter.localdomain>
Tue, 12 Sep 2006 11:34:21 +0000 (13:34 +0200)
tig.c

diff --git a/tig.c b/tig.c
index 8973a7b28a29e25200626df29715641a80f2a066..7121a42e38dd69806ee0d20bcfd40fe30c3dab8e 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -2881,9 +2881,8 @@ update_rev_graph(struct commit *commit)
 
        /* First traverse all lines of revisions up to the active one. */
        for (stackpos = 0; stackpos < stack->size; stackpos++) {
-               if (!strcmp(stack->rev[stackpos], commit->id)) {
+               if (!strcmp(stack->rev[stackpos], commit->id))
                        break;
-               }
 
                push_rev_stack(graph, stack->rev[stackpos]);
        }
@@ -2893,11 +2892,9 @@ update_rev_graph(struct commit *commit)
        for (i = 0; i < parents->size; i++)
                push_rev_stack(graph, parents->rev[i]);
 
-       i = stackpos + 1;
-
        /* FIXME: Moving branches left and right when collapsing a branch. */
-       while (i < stack->size)
-               push_rev_stack(graph, stack->rev[i++]);
+       for (i = stackpos + 1; i < stack->size; i++)
+               push_rev_stack(graph, stack->rev[i]);
 
        draw_rev_graph(commit, stackpos, stack, parents, prev_parents);
        graph_last_rev = stackpos;