Skip to content

Commit 46992b5

Browse files
committed
Merge branch 'hn/log-graph-color-octopus' into maint
Coloring around octopus merges in "log --graph" output was screwy. * hn/log-graph-color-octopus: graph: fix coloring around octopus merges
2 parents 07c55c0 + 339c17b commit 46992b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graph.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -801,10 +801,10 @@ static int graph_draw_octopus_merge(struct git_graph *graph,
801801
int num_dashes =
802802
((graph->num_parents - dashless_commits) * 2) - 1;
803803
for (i = 0; i < num_dashes; i++) {
804-
col_num = (i / 2) + dashless_commits;
804+
col_num = (i / 2) + dashless_commits + graph->commit_index;
805805
strbuf_write_column(sb, &graph->new_columns[col_num], '-');
806806
}
807-
col_num = (i / 2) + dashless_commits;
807+
col_num = (i / 2) + dashless_commits + graph->commit_index;
808808
strbuf_write_column(sb, &graph->new_columns[col_num], '.');
809809
return num_dashes + 1;
810810
}

0 commit comments

Comments
 (0)