{"thread":{"id":"58444","subject":"git rebase crash: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.","startedAt":"2022-09-16T12:50:59Z","lastAt":"2022-10-22T19:06:34Z","messageCount":3,"participants":["Stefano Rivera","Elijah Newren"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"463074","messageId":"20220916124234.h57p67mwywzok23s@haydn.kardiogramm.net","threadId":"58444","inReplyTo":null,"subject":"git rebase crash: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.","fromName":"Stefano Rivera","fromEmail":"stefano@rivera.za.net","sentAt":"2022-09-16T12:42:34Z","receivedAt":"2022-09-16T12:50:59Z","isPatch":false,"sender":{"key":"stefano@rivera.za.net","avatar":null},"body":"Hi, I got a crash in git-rebase, a failed assertion in merge-ort.c\n\n$ git rebase renamed-parent\ngit: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.\n\nI was rebasing a branch that replaced a directory with a symlink, onto a\nbranch that renamed a parent directory of the modification.\n\nReproducer script attached.\n\nUsing --strategy=recursive avoids the crash, so it's a bug in ort.\n\nNot subscribed, please CC me in replies.\n\nThanks,\n\nSR\n\n[System Info]\ngit version:\ngit version 2.38.0.rc0.373.g21cbab7515\ncpu: x86_64\nbuilt from commit: 21cbab75150d71ca294e09180c59ee529ca53957\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 5.18.0-3-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.14-1 (2022-07-23) x86_64\ncompiler info: gnuc: 12.2\nlibc info: glibc: 2.34\n$SHELL (typically, interactive shell): /bin/bash\n\n[Enabled Hooks]\n"},{"id":"463283","messageId":"CABPp-BGdGZ6dg4_wWxkz+VCvaThfn3eL9uqBvmsK3+8GQf0ByA@mail.gmail.com","threadId":"58444","inReplyTo":"20220916124234.h57p67mwywzok23s@haydn.kardiogramm.net","subject":"Re: git rebase crash: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2022-09-20T07:15:56Z","receivedAt":"2022-09-20T07:17:13Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"Hi,\n\nOn Fri, Sep 16, 2022 at 6:24 AM Stefano Rivera <stefano@rivera.za.net> wrote:\n>\n> Hi, I got a crash in git-rebase, a failed assertion in merge-ort.c\n>\n> $ git rebase renamed-parent\n> git: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.\n>\n> I was rebasing a branch that replaced a directory with a symlink, onto a\n> branch that renamed a parent directory of the modification.\n>\n> Reproducer script attached.\n>\n> Using --strategy=recursive avoids the crash, so it's a bug in ort.\n>\n> Not subscribed, please CC me in replies.\n>\n> Thanks,\n>\n> SR\n>\n> [System Info]\n> git version:\n> git version 2.38.0.rc0.373.g21cbab7515\n> cpu: x86_64\n> built from commit: 21cbab75150d71ca294e09180c59ee529ca53957\n> sizeof-long: 8\n> sizeof-size_t: 8\n> shell-path: /bin/sh\n> uname: Linux 5.18.0-3-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.14-1 (2022-07-23) x86_64\n> compiler info: gnuc: 12.2\n> libc info: glibc: 2.34\n> $SHELL (typically, interactive shell): /bin/bash\n>\n> [Enabled Hooks]\n\nThanks for testing out a release candidate, typing up the detailed\nreport, and even finding a simple testcase!  Very cool.\n\nI don't have a fix, but just wanted to send a note out that I've seen\nyour report and will take a look at it this week.\n"},{"id":"465573","messageId":"CABPp-BFEg861ru2mJujnHLCD29WNgp4C6f8+CvL6vFRS6r5NLQ@mail.gmail.com","threadId":"58444","inReplyTo":"CABPp-BGdGZ6dg4_wWxkz+VCvaThfn3eL9uqBvmsK3+8GQf0ByA@mail.gmail.com","subject":"Re: git rebase crash: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2022-10-22T19:06:13Z","receivedAt":"2022-10-22T19:06:34Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"Hi,\n\nOn Tue, Sep 20, 2022 at 12:15 AM Elijah Newren <newren@gmail.com> wrote:\n>\n> Hi,\n>\n> On Fri, Sep 16, 2022 at 6:24 AM Stefano Rivera <stefano@rivera.za.net> wrote:\n> >\n> > Hi, I got a crash in git-rebase, a failed assertion in merge-ort.c\n> >\n> > $ git rebase renamed-parent\n> > git: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.\n> >\n> > I was rebasing a branch that replaced a directory with a symlink, onto a\n> > branch that renamed a parent directory of the modification.\n> >\n> > Reproducer script attached.\n> >\n> > Using --strategy=recursive avoids the crash, so it's a bug in ort.\n> >\n> > Not subscribed, please CC me in replies.\n> >\n> > Thanks,\n> >\n> > SR\n> >\n>\n> Thanks for testing out a release candidate, typing up the detailed\n> report, and even finding a simple testcase!  Very cool.\n>\n> I don't have a fix, but just wanted to send a note out that I've seen\n> your report and will take a look at it this week.\n\nI had a hacky fix for about a month now, and haven't had time to clean\nit up and look around for nearby issues.\n\nI believe the cause here is related to the code added to fix the bug\nin 902c521a35 (\"t6423: more involved directory rename test\",\n2020-10-15).  Since that issue was never fixed in merge-recursive, it\ndidn't get the side effect of this new bug.  Had that other bug been\nfixed in merge-recursive, it may well have exhibited a similar issue\nwith the testcase you reported here.\n\nAnyway, I posted a patch to fix this issue in ort:\nhttps://lore.kernel.org/git/pull.1391.git.1666465450590.gitgitgadget@gmail.com\n\nThanks again for reporting it, and for providing the simple steps to reproduce!\n"}]}