git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Keeping <john@keeping.me.uk>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
	"Dale R. Worley" <worley@alum.mit.edu>,
	git@vger.kernel.org
Subject: Re: [PATCH 1/6] graph: output padding for merge subsequent parents
Date: Fri, 8 Feb 2013 19:31:26 +0000	[thread overview]
Message-ID: <20130208193026.GA1024@river> (raw)
In-Reply-To: <b98eb2bfe2b022ddf1afbe9f7123accfe068e8c9.1360267849.git.john@keeping.me.uk>

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

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> 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

  reply	other threads:[~2013-02-08 19:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07 20:15 [PATCH 0/6] Improve "git log --graph" output of merges John Keeping
2013-02-07 20:15 ` [PATCH 1/6] graph: output padding for merge subsequent parents John Keeping
2013-02-08 19:31   ` John Keeping [this message]
2013-02-07 20:15 ` [PATCH 2/6] diff: write prefix to the correct file John Keeping
2013-02-07 20:15 ` [PATCH 3/6] diff.c: make constant string arguments const John Keeping
2013-02-07 20:15 ` [PATCH 4/6] diff: add diff_line_prefix function John Keeping
2013-02-07 20:15 ` [PATCH 5/6] diff.c: use diff_line_prefix() where applicable John Keeping
2013-02-07 20:15 ` [PATCH 6/6] combine-diff.c: teach combined diffs about line prefix John Keeping
2013-02-07 20:53 ` [PATCH 0/6] Improve "git log --graph" output of merges Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130208193026.GA1024@river \
    --to=john@keeping.me.uk \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=worley@alum.mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).