diff options
-rw-r--r-- | graph.c | 10 | ||||
-rwxr-xr-x | t/t4215-log-skewed-merges.sh | 2 |
2 files changed, 9 insertions, 3 deletions
@@ -1233,8 +1233,14 @@ static void graph_output_collapsing_line(struct git_graph *graph, struct graph_l * prevent any other edges from moving * horizontally. */ - if (horizontal_edge == -1) - horizontal_edge = i; + if (horizontal_edge == -1) { + int j; + horizontal_edge_target = target; + horizontal_edge = i - 1; + + for (j = (target * 2) + 3; j < (i - 2); j += 2) + graph->mapping[j] = target; + } } } diff --git a/t/t4215-log-skewed-merges.sh b/t/t4215-log-skewed-merges.sh index 099e4b89b4..1d0d3240ff 100755 --- a/t/t4215-log-skewed-merges.sh +++ b/t/t4215-log-skewed-merges.sh @@ -311,7 +311,7 @@ test_expect_success 'log --graph with multiple tips and colors' ' test_cmp expect.colors actual.colors ' -test_expect_failure 'log --graph with multiple tips' ' +test_expect_success 'log --graph with multiple tips' ' git checkout --orphan 7_1 && test_commit 7_A && test_commit 7_B && |