Re: git merge -s subtree seems to be broken.
- From
Jeff King <peff@peff.net>
- Date
- Jul 31, 2018, 17:23 UTC
- Message-ID
- <20180731172304.GA16977@sigill.intra.peff.net>
- In-Reply-To
- <xmqqh8kfcokk.fsf@gitster-ct.c.googlers.com>
On Tue, Jul 31, 2018 at 10:17:15AM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> Jeff King <peff@peff.net> writes:
>
> > +...
> > + } else if (cmp > 0) {
> > /* path2 does not appear in one */
> > + score += score_missing(two.entry.mode, two.entry.path);
> > + update_tree_entry(&two);
> > + continue;
> > + } if (oidcmp(one.entry.oid, two.entry.oid)) {
>
> As the earlier ones do the "continue at the end of the block", this
> does not affect the correctness, but I think you either meant "else if"
> or a fresh "if/else" that is disconnected from the previous if/else if/...
> chain.Yes, thanks. I actually started to write it without the "continue" at all, and a big "else" that checked the "we have both" case. But I backed that out (in favor of a smaller diff), and forgot to add back in the "else if".
-Peff