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

Re: git rebase crash: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.

From
Elijah Newren <newren@gmail.com>
Date
Oct 22, 2022, 19:06 UTC
Message-ID
<CABPp-BFEg861ru2mJujnHLCD29WNgp4C6f8+CvL6vFRS6r5NLQ@mail.gmail.com>
In-Reply-To
<CABPp-BGdGZ6dg4_wWxkz+VCvaThfn3eL9uqBvmsK3+8GQf0ByA@mail.gmail.com>
Hi,
On Tue, Sep 20, 2022 at 12:15 AM Elijah Newren <newren@gmail.com> wrote:
Show 29 quoted lines
>
> Hi,
>
> On Fri, Sep 16, 2022 at 6:24 AM Stefano Rivera <stefano@rivera.za.net> wrote:
> >
> > Hi, I got a crash in git-rebase, a failed assertion in merge-ort.c
> >
> > $ git rebase renamed-parent
> > git: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.
> >
> > I was rebasing a branch that replaced a directory with a symlink, onto a
> > branch that renamed a parent directory of the modification.
> >
> > Reproducer script attached.
> >
> > Using --strategy=recursive avoids the crash, so it's a bug in ort.
> >
> > Not subscribed, please CC me in replies.
> >
> > Thanks,
> >
> > SR
> >
>
> Thanks for testing out a release candidate, typing up the detailed
> report, and even finding a simple testcase!  Very cool.
>
> I don't have a fix, but just wanted to send a note out that I've seen
> your report and will take a look at it this week.

I had a hacky fix for about a month now, and haven't had time to clean it up and look around for nearby issues.

I believe the cause here is related to the code added to fix the bug in 902c521a35 ("t6423: more involved directory rename test", 2020-10-15). Since that issue was never fixed in merge-recursive, it didn't get the side effect of this new bug. Had that other bug been fixed in merge-recursive, it may well have exhibited a similar issue with the testcase you reported here.

Anyway, I posted a patch to fix this issue in ort: https://lore.kernel.org/git/pull.1391.git.1666465450590.gitgitgadget@gmail.com

Thanks again for reporting it, and for providing the simple steps to reproduce!
Previous: Elijah Newren
Message 3 of 3 in “git rebase crash: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.”
  1. Stefano RiveraSep 16, 2022
  2. Elijah NewrenSep 20, 2022
  3. Elijah NewrenOct 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.