提交 a6c1a382 编写于 作者: A Allan Caffee 提交者: Junio C Hamano

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: NAllan Caffee <allan.caffee@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 36a31fea
......@@ -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)) {
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册