summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2b75753)
raw | patch | inline | side by side (parent: 2b75753)
author | Jonas Fonseca <fonseca@diku.dk> | |
Tue, 12 Sep 2006 07:33:16 +0000 (09:33 +0200) | ||
committer | Jonas Fonseca <fonseca@antimatter.localdomain> | |
Tue, 12 Sep 2006 07:33:16 +0000 (09:33 +0200) |
tig.c | patch | blob | history |
index 40737234c240c394b1b781567cf905c554eff216..2431f66e56df34624c43345214f014a9a14082a4 100644 (file)
--- a/tig.c
+++ b/tig.c
{
struct rev_stack *stack = &graph_stacks[graph_stack_no++ & 1];
struct rev_stack *graph = &graph_stacks[graph_stack_no & 1];
+ chtype symbol;
size_t stackpos = 0;
size_t i;
/* 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)) {
- while (stackpos + 1< stack->size &&
+ while (stackpos + 1 < stack->size &&
!strcmp(stack->rev[stackpos + 1], commit->id))
stackpos++;
break;
/* Place the symbol for this commit. */
if (graph_parents.size == 0)
- commit->graph[commit->graph_size++] = 'I';
+ symbol = 'I';
else if (graph_parents.size > 1)
- commit->graph[commit->graph_size++] = 'M';
+ symbol = 'M';
else if (stackpos >= stack->size)
- commit->graph[commit->graph_size++] = '+';
+ symbol = '+';
else
- commit->graph[commit->graph_size++] = '*';
+ symbol = '*';
+
+ commit->graph[commit->graph_size++] = symbol;
stackpos++;