aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Caffee <allan.caffee@gmail.com>2009-04-22 17:27:59 -0400
committerJunio C Hamano <gitster@pobox.com>2009-04-22 17:49:56 -0700
commita6c1a3827c934872726bafb35f51f2ad9b9e897f (patch)
tree3a0f601dcec66d00cbacfc1848b42ca75ad0c4be
parent36a31feae23ac45a130fa38b2934a74e4e7156b4 (diff)
downloadgit-a6c1a3827c934872726bafb35f51f2ad9b9e897f.tar.gz
git-a6c1a3827c934872726bafb35f51f2ad9b9e897f.tar.xz
graph API: fix a bug in the rendering of octopus merges
An off by one error was causing octopus merges with 3 parents to not be rendered correctly. This regression was introduced by 427fc5. Signed-off-by: Allan Caffee <allan.caffee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--graph.c2
-rwxr-xr-xt/t4202-log.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/graph.c b/graph.c
index 31e09eb2c..b7879f8c6 100644
--- a/graph.c
+++ b/graph.c
@@ -852,7 +852,7 @@ static void graph_output_commit_line(struct git_graph *graph, struct strbuf *sb)
graph_output_commit_char(graph, sb);
chars_written++;
- if (graph->num_parents > 3)
+ if (graph->num_parents > 2)
chars_written += graph_draw_octopus_merge(graph,
sb);
} else if (seen_this && (graph->num_parents > 2)) {
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 46bd24f50..67f983fea 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -342,7 +342,7 @@ cat > expect <<\EOF
* initial
EOF
-test_expect_failure 'log --graph with merge' '
+test_expect_sucess 'log --graph with merge' '
git log --graph --date-order --pretty=tformat:%s |
sed "s/ *$//" >actual &&
test_cmp expect actual