Skip to content

Commit

Permalink
graph API: fix a bug in the rendering of octopus merges
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Allan Caffee authored and Junio C Hamano committed Apr 23, 2009
1 parent 36a31fe commit a6c1a38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion t/t4202-log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a6c1a38

Please sign in to comment.