Subject: Re: [PATCH 1/6] graph: output padding for merge subsequent parents

From: John Keeping <[email-masked]>
Date: Fri, 8 Feb 2013 19:31:26 +0000

[Moved from the thread where this was initially posted to reply to the
series.]

Matthieu Moy <[email-masked]> wrote:
> This works, but if we know we're not going to enter the while loop, it
> seams even easier to do this:
> 
> --- a/graph.c
> +++ b/graph.c
> @@ -1227,7 +1227,17 @@ void graph_show_commit(struct git_graph *graph)
>         if (!graph)
>                 return;
>  
> -       while (!shown_commit_line && !graph_is_commit_finished(graph)) {
> +       /*
> +        * 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);
> +               return;
> +       }
> +
> +       while (!shown_commit_line) {

This looks good to me.  I'll amend locally and re-send in a few days
after giving others a chance to comment.

John