Merge branch 'so/rebase-doc'
[gitweb.git] / graph.c
diff --git a/graph.c b/graph.c
index 640433166b39c515746d698566839326d9ce7bbe..dfb99f6436b41f5a567bc7c7a5785588bef15b41 100644 (file)
--- a/graph.c
+++ b/graph.c
@@ -1145,7 +1145,7 @@ int graph_next_line(struct git_graph *graph, struct strbuf *sb)
 
 static void graph_padding_line(struct git_graph *graph, struct strbuf *sb)
 {
-       int i, j;
+       int i;
 
        if (graph->state != GRAPH_COMMIT) {
                graph_next_line(graph, sb);
@@ -1169,8 +1169,7 @@ static void graph_padding_line(struct git_graph *graph, struct strbuf *sb)
                                strbuf_addch(sb, ' ');
                        else {
                                int num_spaces = ((graph->num_parents - 2) * 2);
-                               for (j = 0; j < num_spaces; j++)
-                                       strbuf_addch(sb, ' ');
+                               strbuf_addchars(sb, ' ', num_spaces);
                        }
                } else {
                        strbuf_write_column(sb, col, '|');