diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-01-30 14:17:08 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-01-30 14:17:08 -0800 |
| commit | d52adee7790352c96fa37558206e6db8866879d2 (patch) | |
| tree | f8b1110bec01757b1ad7b351559cac71f7986cc0 /graph.c | |
| parent | 690947449157c8fd6e84b25352f717d5f1fc6a51 (diff) | |
| parent | c958d3bd0a3781094db6fa8c45776785c98b6c98 (diff) | |
| download | git-d52adee7790352c96fa37558206e6db8866879d2.tar.gz | |
Merge branch 'ds/graph-horizontal-edges'
Rendering by "git log --graph" of ancestry lines leading to a merge
commit were made suboptimal to waste vertical space a bit with a
recent update, which has been corrected.
* ds/graph-horizontal-edges:
graph: fix collapse of multiple edges
graph: add test to demonstrate horizontal line bug
Diffstat (limited to 'graph.c')
| -rw-r--r-- | graph.c | 10 |
1 files changed, 8 insertions, 2 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; + } } } |
