summaryrefslogtreecommitdiff
path: root/graph.c
diff options
context:
space:
mode:
authorAdam Simpkins <adam@adamsimpkins.net>2008-05-24 02:24:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-05-25 18:42:44 (GMT)
commit2ecbd0a0db0f9d59a5df02a6daeb87e611171fa4 (patch)
treef8fba15e4ab099f8b02b1925fd98240950f8db5e /graph.c
parent182fb4df9120257c2e6b041dd58eef3de5b530d2 (diff)
downloadgit-2ecbd0a0db0f9d59a5df02a6daeb87e611171fa4.zip
git-2ecbd0a0db0f9d59a5df02a6daeb87e611171fa4.tar.gz
git-2ecbd0a0db0f9d59a5df02a6daeb87e611171fa4.tar.bz2
graph API: fix graph mis-alignment after uninteresting commits
The graphing code had a bug that caused it to output branch lines incorrectly after ignoring an uninteresting commit. When computing how to match up the branch lines from the current commit to the next one, it forgot to take into account that it needed to initially start with 2 empty spaces where the missing commit would have gone. So, instead of drawing this, | * | <- Commit with uninteresting parent | / * | It used to incorrectly draw this: | * | <- Commit with uninteresting parent * | Signed-off-by: Adam Simpkins <adam@adamsimpkins.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'graph.c')
-rw-r--r--graph.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/graph.c b/graph.c
index 9d6ed30..400f014 100644
--- a/graph.c
+++ b/graph.c
@@ -190,7 +190,10 @@ static void graph_insert_into_new_columns(struct git_graph *graph,
* Ignore uinteresting and pruned commits
*/
if (commit->object.flags & (UNINTERESTING | TREESAME))
+ {
+ *mapping_index += 2;
return;
+ }
/*
* If the commit is already in the new_columns list, we don't need to