From: Alex Henrie <alexhenrie24@gmail.com>
To: CB Bailey <cb@hashpling.org>
Cc: Git mailing list <git@vger.kernel.org>,
dstolee@microsoft.com, Junio C Hamano <gitster@pobox.com>,
Derrick Stolee <stolee@gmail.com>
Subject: Re: [PATCH v3] diffcore-break: use a goto instead of a redundant if statement
Date: Sun, 29 Sep 2019 14:10:33 -0600 [thread overview]
Message-ID: <CAMMLpeQnVb1M_Wy_GDeH44YVweXvNQ2jpyJqtvJ4zS_fGfxKuw@mail.gmail.com> (raw)
In-Reply-To: <20190929093706.ylm5dsftwl2y2nnz@hashpling.org>
On Sun, Sep 29, 2019 at 3:37 AM CB Bailey <cb@hashpling.org> wrote:
>
> Previously, if the condition matched in the inner loop, the function
> would null out the entry in the queue that that inner loop had reached
> (q->queue[j] = NULL) and then break out of the inner loop. This meant
> that the outer loop would skip over this entry (if (!p)).
>
> The change introduced seems to break out of both loops as soon as we
> reach one match, whereas before other subsequent matches would be
> considered and merged. Not only this, but the outer 'else' case for all
> subsequent entries is skipped so the rest of the entries the original
> queue are missing from 'outq'.
> I spent a bit of time trying to see if this change was user visible
> which turned out to be unneeded as t4008-diff-break-rewrite.sh already
> fails with this change for me in my environment, initially with this
> test but also 3 other tests in this file.
Thank you for reviewing this. I should have run `make test` myself
before sending the patch; I do indeed see the same test failure that
you saw. I will send a v4 of this patch with the label in the right
place.
-Alex
next prev parent reply other threads:[~2019-09-29 20:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-29 0:56 [PATCH v3] diffcore-break: use a goto instead of a redundant if statement Alex Henrie
2019-09-29 9:37 ` CB Bailey
2019-09-29 20:10 ` Alex Henrie [this message]
2019-09-30 1:14 ` 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=CAMMLpeQnVb1M_Wy_GDeH44YVweXvNQ2jpyJqtvJ4zS_fGfxKuw@mail.gmail.com \
--to=alexhenrie24@gmail.com \
--cc=cb@hashpling.org \
--cc=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=stolee@gmail.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.
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).