]> git.ipfire.org Git - thirdparty/git.git/blobdiff - graph.c
unpack-trees: also allow get_progress() to work on a different index
[thirdparty/git.git] / graph.c
diff --git a/graph.c b/graph.c
index aaf97069bd0b140da425dbc1a5b9fc7250459f13..4fb25ad464db5778262936cdcc97b5088abc7678 100644 (file)
--- a/graph.c
+++ b/graph.c
@@ -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;
+                       }
                }
        }