git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Elijah Newren <newren@gmail.com>
Cc: Jay Soffian <jaysoffian@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org
Subject: Re: What's cooking in git.git (Jun 2011, #02; Sat, 11)
Date: Thu, 16 Jun 2011 17:05:51 -0400	[thread overview]
Message-ID: <20110616210551.GA15505@sigill.intra.peff.net> (raw)
In-Reply-To: <BANLkTin-sAXAZ4ZJ9z77SSYx+xYTYeZMww@mail.gmail.com>

On Mon, Jun 13, 2011 at 10:27:50PM -0600, Elijah Newren wrote:

> On Sun, Jun 12, 2011 at 12:49 AM, Junio C Hamano <gitster@pobox.com> wrote:
> > Here are the topics that have been cooking.  Commits prefixed with '-' are
> > only in 'pu' while commits prefixed with '+' are in 'next'.
> >
> > --------------------------------------------------
> > [Stalled]
> >
> > * jk/maint-merge-rename-create (2011-03-25) 3 commits
> >  - merge: turn on rewrite detection
> >  - merge: handle renames with replacement content
> >  - t3030: fix accidental success in symlink rename
> >
> > Peff wanted to reroll this. Perhaps will discard to make room for Elijah's
> > merge-recursive series in the meantime.
> 
> Peff: Do you want any help rerolling, updating, reviewing, etc.?  I
> don't want to cause any undue problems with my merge-recursive series,
> and besides, the idea you have in this series looks like it may be
> interesting.

Thanks. The sticking point in my series that there is a weird regression
it introduces, and I haven't quite figured out the cause.

I'm cc'ing Jay Soffian, who found it. You can reproduce with this recipe
(sorry, the chromium repo is huge, but I don't have a smaller test case
yet):

  git clone http://git.chromium.org/git/chromium.git &&
  cd chromium &&
  git config merge.renameLimit 0 &&
  git checkout 0f6d00c &&
  git cherry-pick d7081a74

Looking at d7081a74, you can see that it's a tiny commit, and in fact it
should cherry-pick just fine. But due to the 3-way merge that
cherry-pick does, we still end up considering a lot of renames between
the merge base (d7081a74^) and 0f6d00c. Which is fine and correct, of
course, but makes the merge a lot more complex than it would at first
appear.

With git v1.7.5.3, it works just fine. With my patches on top, it
reliably fails the merge (even though there were no conflicts!), and
leaves a ton of crufty temporary files in the working directory.

Bumping up the merge verbosity, it does report a bunch of rename/add
conflicts. Which are totally bogus, of course. Here's what I wrote
earlier to Jay:

   The final patch turned on break detection. The patch before it fixed
   the "source" case: when the source of a rename comes from something
   besides empty (because the source is a broken pair), we need to merge
   properly and not just delete. But I never did the "dest" case, in
   which merge-recursive assumes that renamed content started as empty.

   And that's why you see the bogus "rename/add" conflict, I think. It's
   assuming the file came from nowhere, but it came from a break pair.
   So the good news is I think I can come up with a simple test case,
   and the fix is probably something like comparing against the ancestor
   sha1 instead of the null sha1.

But then I got sidetracked, and as you probably know from working on
merge-recursive, it's some pretty hairy code. Every time I start to look
at it I get confused and can't remember what breakthrough I thought I
was close to making before. :)

If you have any input, I'd appreciate it.

-Peff

      reply	other threads:[~2011-06-16 21:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-12  6:49 What's cooking in git.git (Jun 2011, #02; Sat, 11) Junio C Hamano
2011-06-12 12:14 ` Ramkumar Ramachandra
2011-06-13  0:17   ` "libify part of reset" mini-series (Re: What's cooking in git.git (Jun 2011, #02; Sat, 11)) Jonathan Nieder
2011-06-13 13:16   ` What's cooking in git.git (Jun 2011, #02; Sat, 11) Junio C Hamano
2011-06-12 16:18 ` Sverre Rabbelier
2011-06-13 15:25   ` Junio C Hamano
2011-06-13 16:07     ` Sverre Rabbelier
2011-06-14  4:27 ` Elijah Newren
2011-06-16 21:05   ` Jeff King [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

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

  git send-email \
    --in-reply-to=20110616210551.GA15505@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jaysoffian@gmail.com \
    --cc=newren@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).