]> git.ipfire.org Git - thirdparty/git.git/blobdiff - graph.c
Merge branch 'jt/t5500-unflake'
[thirdparty/git.git] / graph.c
diff --git a/graph.c b/graph.c
index aaf97069bd0b140da425dbc1a5b9fc7250459f13..4cd9915075ff23d8a5218609b06239b9d9f08435 100644 (file)
--- a/graph.c
+++ b/graph.c
@@ -1055,7 +1055,7 @@ static void graph_output_commit_line(struct git_graph *graph, struct graph_line
                graph_update_state(graph, GRAPH_COLLAPSING);
 }
 
-const char merge_chars[] = {'/', '|', '\\'};
+static const char merge_chars[] = {'/', '|', '\\'};
 
 static void graph_output_post_merge_line(struct git_graph *graph, struct graph_line *line)
 {
@@ -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;
+                       }
                }
        }