git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Bug in merge-ort (rename detection can have collisions?)

From
Elijah Newren <newren@gmail.com>
Date
Jun 11, 2022, 08:56 UTC
Message-ID
<CABPp-BEXdfEw5jYn-WM_pyEyS5AHmYEJhVNS8GtHAd2BXCaB_A@mail.gmail.com>
In-Reply-To
<xmqqczfgfojb.fsf@gitster.g>
On Fri, Jun 10, 2022 at 9:53 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 25 quoted lines
>
> Elijah Newren <newren@gmail.com> writes:
>
> > On Tue, Jun 7, 2022 at 5:11 PM Glen Choo <chooglen@google.com> wrote:
> >>
> >> (I'm not 100% what the bug _is_, only that there is one.)
> >>
> >> = Report
> >>
> >> At $DAYJOB, there was a report that "git merge" was failing on certain
> >> branches. Fortunately, the repo is publicly accessible, so I can share
> >> the full reproduction recipe:
> >> ...
> > Thanks for the detailed report; very cool.  Interestingly, if you
> > reverse the direction of the merge (checkout origin/upstream-master
> > and merge origin/master) then you get a different error:
> > ...
> > Anyway, long story short...I don't have a fix yet, but just thought
> > I'd mention I saw the email and spent some hours digging in.
>
> Thanks for continued support for the ort strategy.  From the very
> beginning, I was hesitant to make our tools try to be too clever
> with excessive heuristics, but at least we are not making a silent
> mismerge in this case, so it is probably OK, especially with "-s
> recursive" still left as an escape hatch.

I'm pretty sure the bug would still trigger even if we removed all the heuristic differences that the ort strategy has relative to the recursive one; I don't think those are related to this problem at all.

In fact, the more general problem area here appears to affect the recursive strategy as well. I'm glad the specific testcase reported works under recursive and gave Glen (or his user) a workaround, but that feels like luck rather than design because my minimal reproduction testcase not only triggers the same issue he saw with the ort strategy, but also triggers a previously unknown fatal bug in the recursive strategy too.

Previous: Junio C HamanoNext: Glen Choo
Message 4 of 7 in “Bug in merge-ort (rename detection can have collisions?)”
  1. Glen ChooJun 8, 2022
  2. Elijah NewrenJun 10, 2022
  3. Junio C HamanoJun 10, 2022
  4. Elijah NewrenJun 11, 2022
  5. Glen ChooJun 13, 2022
  6. Elijah NewrenJun 22, 2022
  7. Glen ChooJun 22, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.