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

Re: [BUG?] assertion failure when merging branches

From
Elijah Newren <newren@gmail.com>
Date
Dec 27, 2021, 22:15 UTC
Message-ID
<CABPp-BH=nqeqpW8Grn+6No4HvRaBaC9spwEsDcj1BWdsipJh=Q@mail.gmail.com>
In-Reply-To
<CAN0XMOK8iHZnbtYw7CPAQGJcmuVSDxQoFNFEwiaa41V89F1rzA@mail.gmail.com>
On Mon, Dec 27, 2021 at 10:35 AM Ralf Thielow <ralf.thielow@gmail.com> wrote:
Show 24 quoted lines
>
> Hi,
>
> At $WORK I tried to merge two branches and ran into an assertion
> failure. I exported the two branches down to the merge base as
> an anonymous repo, so that it can be reproduced.
>
> In the branch I tried to merge into, files have been moved
> and/or reformatted.
>
> My Git version is 2.34.1.
>
> wget https://gist.github.com/ralfth/5b624abb0a99e3e705a0984c4b2d253e/raw/7f7ef5b10711550b90342c50b53ce25c19075c97/repo.txt
> mkdir tmp
> cd tmp
> git init
> cat ../repo.txt | git fast-import
> git checkout ref0/ref1
> git config merge.renormalize true
> git merge ref2/ref0/ref3
>
> git: merge-ort.c:3846: process_entry: Assertion `!ci->df_conflict &&
> !ci->path_conflict' failed.
> Aborted (core dumped)

Yikes, sorry about this renormalization bug in merge-ort. For now, you can recover via:

  $ rm .git/index.lock
  $ rm .git/MERGE_*
and then as a workaround you can either use the old merge backend for now:
  $ git config pull.twohead recursive

or continue using the new merge backend and just turn off merge.renormalize. After that, a subsequent `git merge ref2/ref0/ref3` should work for you.

As for the bug, I introduced this in commit a492d5331c ("merge-ort: ensure we consult df_conflict and path_conflicts", 2021-06-30), and before that commit, this type of setup would be mis-merged (with a rename/delete conflict getting ignored). I'll submit a patch with a smaller testcase soon.

Previous: Ralf ThielowNext: Elijah Newren
Message 2 of 3 in “[BUG?] assertion failure when merging branches”
  1. Ralf ThielowDec 27, 2021
  2. Elijah NewrenDec 27, 2021
  3. Elijah NewrenDec 28, 2021

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.