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>
Allan Caffee committed
Apr 22, 2009 at 17:27 UTC
a6c1a3827c934872726bafb35f51f2ad9b9e897f
2 files changed
+2
-2
graph.c
+1
-1
@@ -852,7 +852,7 @@ static void graph_output_commit_line(struct git_graph *graph, struct strbuf *sb)
852
graph_output_commit_char(graph, sb);
853
chars_written++;
854
855
- if (graph->num_parents > 3)
855
+ if (graph->num_parents > 2)
856
chars_written += graph_draw_octopus_merge(graph,
857
sb);
858
} else if (seen_this && (graph->num_parents > 2)) {
t/t4202-log.sh
+1
-1
@@ -342,7 +342,7 @@ cat > expect <<\EOF
342
* initial
343
EOF
344
345
-test_expect_failure 'log --graph with merge' '
345
+test_expect_sucess 'log --graph with merge' '
346
git log --graph --date-order --pretty=tformat:%s |
347
sed "s/ *$//" >actual &&
348
test_cmp expect actual