git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Edmundo Carmona Antoranz <eantoranz@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH v1] builtin/merge.c - cleanup of code in for-cycle that tests strategies
Date: Mon, 8 Jul 2019 14:52:19 -0600	[thread overview]
Message-ID: <CAOc6etbwHAAFSM-GwuD8BaC76EQNv+pQ5TgNCWN65DhNfV3KEw@mail.gmail.com> (raw)
In-Reply-To: <xmqqh87wxoza.fsf@gitster-ct.c.googlers.com>

On Mon, Jul 8, 2019 at 2:15 PM Junio C Hamano <gitster@pobox.com> wrote:
> In the body of the proposed commit log message, please finish each
> sentence with a full-stop.

Ok

>
> These bullets are all subjective, and do not add any value to what
> you already said in the second sentence.

Ok


>
> These are facts that readers can see for themselves and agree with.
>
> Something like...
>
>         The cmd_merge() function has a loop that tries different
>         merge strategies in turn, and stops when a strategy gets a
>         clean merge, while keeping the "best" conflicted merge so
>         far.
>
>         Make the loop easier to follow by moving the code around,
>         ensuring that there is only one "break" in the loop where
>         an automerge succeeds.  Also group the actions that are
>         performed after an automerge succeeds together to a single
>         location, outside and after the loop.
>
> perhaps?

I like it.

> > +                     int cnt = evaluate_result();
> This introduces -Wdeclaration-after-statement, doesn't it?

It does! Let me take care of it. (Didn't know about DEVELOPER
environment variable up until... 5 minutes ago?)

> Perhaps just declare the variable at the top of the for loop, next
> to where the local 'ret' is declared?

Yep, make sense

>
> Other than this single glitch, I think the code with this patch does
> become easier to follow.

Great!

Let me come back with v2 during the day.

Thanks!

      reply	other threads:[~2019-07-08 20:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-07  0:00 [PATCH v1] builtin/merge.c - cleanup of code in for-cycle that tests strategies Edmundo Carmona Antoranz
2019-07-07  3:15 ` Edmundo Carmona Antoranz
2019-07-08 20:15 ` Junio C Hamano
2019-07-08 20:52   ` Edmundo Carmona Antoranz [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=CAOc6etbwHAAFSM-GwuD8BaC76EQNv+pQ5TgNCWN65DhNfV3KEw@mail.gmail.com \
    --to=eantoranz@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).