X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=graph.c;h=2a3fc5c0ec128ba2b6d024b3172bd3a110e361fd;hb=30784198b766b19a639c199e4365f2a805fc08c6;hp=391a712e5eafbc05b8d4b739d96aaca0dd481460;hpb=3cc3cf970c5ce477bde78df73614d1efba2b52eb;p=git.git diff --git a/graph.c b/graph.c index 391a712e5..2a3fc5c0e 100644 --- a/graph.c +++ b/graph.c @@ -1227,6 +1227,16 @@ void graph_show_commit(struct git_graph *graph) if (!graph) return; + /* + * When showing a diff of a merge against each of its parents, we + * are called once for each parent without graph_update having been + * called. In this case, simply output a single padding line. + */ + if (graph_is_commit_finished(graph)) { + graph_show_padding(graph); + shown_commit_line = 1; + } + while (!shown_commit_line && !graph_is_commit_finished(graph)) { shown_commit_line = graph_next_line(graph, &msgbuf); fwrite(msgbuf.buf, sizeof(char), msgbuf.len, stdout);