index-pack: fix compilation with NO_PTHREADS
[gitweb.git] / graph.c
diff --git a/graph.c b/graph.c
index 23fff73e18771c4163a93ac6b16d7b2021419e90..c25a09a8fdaf3e90bf7e029c78127146418ab023 100644 (file)
--- a/graph.c
+++ b/graph.c
@@ -1155,20 +1155,11 @@ static void graph_padding_line(struct git_graph *graph, struct strbuf *sb)
         */
        for (i = 0; i < graph->num_columns; i++) {
                struct column *col = &graph->columns[i];
-               struct commit *col_commit = col->commit;
-               if (col_commit == graph->commit) {
-                       strbuf_write_column(sb, col, '|');
-
-                       if (graph->num_parents < 3)
-                               strbuf_addch(sb, ' ');
-                       else {
-                               int num_spaces = ((graph->num_parents - 2) * 2);
-                               strbuf_addchars(sb, ' ', num_spaces);
-                       }
-               } else {
-                       strbuf_write_column(sb, col, '|');
+               strbuf_write_column(sb, col, '|');
+               if (col->commit == graph->commit && graph->num_parents > 2)
+                       strbuf_addchars(sb, ' ', (graph->num_parents - 2) * 2);
+               else
                        strbuf_addch(sb, ' ');
-               }
        }
 
        graph_pad_horizontally(graph, sb, graph->num_columns);