{"thread":{"id":"47099","subject":"Regression[2.14.3->2.15]: Interactive rebase fails if submodule is modified","startedAt":"2017-11-02T08:30:41Z","lastAt":"2017-11-06T20:36:24Z","messageCount":9,"participants":["Orgad Shaneh","Stefan Beller","Johannes Schindelin","Brandon Williams"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"331663","messageId":"CAGHpTBJTm=3f_VCnNLeE=V4CwvC6dM8qCmGRPDap6rszcpb65A@mail.gmail.com","threadId":"47099","inReplyTo":null,"subject":"Regression[2.14.3->2.15]: Interactive rebase fails if submodule is modified","fromName":"Orgad Shaneh","fromEmail":"orgads@gmail.com","sentAt":"2017-11-02T08:30:33Z","receivedAt":"2017-11-02T08:30:41Z","isPatch":false,"sender":{"key":"orgads@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1246544?v=4"},"body":"I can't reproduce this with a minimal example, but it happens in my project.\n\nWhat I tried to do for reproducing is:\nrm -rf super sub\nmkdir sub; cd sub; git init\ngit commit --allow-empty -m 'Initial commit'\nmkdir ../super; cd ../super\ngit init\ngit submodule add ../sub\ntouch foo; git add foo sub\ngit commit -m 'Initial commit'\ntouch a; git add a; git commit -m 'a'\ntouch b; git add b; git commit -m 'b'\ncd sub; git commit --allow-empty -m 'New commit'; cd ..\ngit rebase -i HEAD^^\n\nThen drop a.\n\nIn my project I get:\nerror: cannot rebase: You have unstaged changes.\n\nThis works fine with 2.14.3.\n\n- Orgad\n"},{"id":"331684","messageId":"CAGZ79kZaCe6ATXajK_HhzhDcWm9CV3bsJ5EAqE5UYXBc+_b5yA@mail.gmail.com","threadId":"47099","inReplyTo":"CAGHpTBJTm=3f_VCnNLeE=V4CwvC6dM8qCmGRPDap6rszcpb65A@mail.gmail.com","subject":"Re: Regression[2.14.3->2.15]: Interactive rebase fails if submodule is modified","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-11-02T18:34:20Z","receivedAt":"2017-11-02T18:34:52Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Thu, Nov 2, 2017 at 1:30 AM, Orgad Shaneh <orgads@gmail.com> wrote:\n> I can't reproduce this with a minimal example, but it happens in my project.\n>\n> What I tried to do for reproducing is:\n> rm -rf super sub\n> mkdir sub; cd sub; git init\n> git commit --allow-empty -m 'Initial commit'\n> mkdir ../super; cd ../super\n> git init\n> git submodule add ../sub\n> touch foo; git add foo sub\n> git commit -m 'Initial commit'\n> touch a; git add a; git commit -m 'a'\n> touch b; git add b; git commit -m 'b'\n> cd sub; git commit --allow-empty -m 'New commit'; cd ..\n> git rebase -i HEAD^^\n>\n> Then drop a.\n>\n> In my project I get:\n> error: cannot rebase: You have unstaged changes.\n>\n> This works fine with 2.14.3.\n\n  git log --oneline v2.14.3..v2.15.0 -- submodule.c\ndoesn't give any promising hints (i.e. I don't think one of a\nsubmodule related series introduced this either by chance or\non purpose)\n\n\"rebase -i\" was rewritten into C in 570676e011, though\nthat series was extensively tested by DScho, so I wouldn't\nwant to point fingers here quickly.\n\nWould you be willing to bisect this behavior?\n"},{"id":"331737","messageId":"CAGHpTB+58ZeXxkprYegjA6w4Ar0sPc=_OUENuvn+_CBxLXOsNw@mail.gmail.com","threadId":"47099","inReplyTo":"CAGZ79kZaCe6ATXajK_HhzhDcWm9CV3bsJ5EAqE5UYXBc+_b5yA@mail.gmail.com","subject":"Re: Regression[2.14.3->2.15]: Interactive rebase fails if submodule is modified","fromName":"Orgad Shaneh","fromEmail":"orgads@gmail.com","sentAt":"2017-11-02T21:45:43Z","receivedAt":"2017-11-02T21:45:49Z","isPatch":false,"sender":{"key":"orgads@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1246544?v=4"},"body":"On Thu, Nov 2, 2017 at 8:34 PM, Stefan Beller <sbeller@google.com> wrote:\n> On Thu, Nov 2, 2017 at 1:30 AM, Orgad Shaneh <orgads@gmail.com> wrote:\n>> I can't reproduce this with a minimal example, but it happens in my project.\n>>\n>> What I tried to do for reproducing is:\n>> rm -rf super sub\n>> mkdir sub; cd sub; git init\n>> git commit --allow-empty -m 'Initial commit'\n>> mkdir ../super; cd ../super\n>> git init\n>> git submodule add ../sub\n>> touch foo; git add foo sub\n>> git commit -m 'Initial commit'\n>> touch a; git add a; git commit -m 'a'\n>> touch b; git add b; git commit -m 'b'\n>> cd sub; git commit --allow-empty -m 'New commit'; cd ..\n>> git rebase -i HEAD^^\n>>\n>> Then drop a.\n>>\n>> In my project I get:\n>> error: cannot rebase: You have unstaged changes.\n>>\n>> This works fine with 2.14.3.\n>\n>   git log --oneline v2.14.3..v2.15.0 -- submodule.c\n> doesn't give any promising hints (i.e. I don't think one of a\n> submodule related series introduced this either by chance or\n> on purpose)\n>\n> \"rebase -i\" was rewritten into C in 570676e011, though\n> that series was extensively tested by DScho, so I wouldn't\n> want to point fingers here quickly.\n>\n> Would you be willing to bisect this behavior?\n\nBisected to ff6f1f564c48def1f8e1852826bab58af5044b06:\nsubmodule-config: lazy-load a repository's .gitmodules file\n\n- Orgad\n"},{"id":"331786","messageId":"alpine.DEB.2.21.1.1711031658190.6482@virtualbox","threadId":"47099","inReplyTo":"CAGHpTBJTm=3f_VCnNLeE=V4CwvC6dM8qCmGRPDap6rszcpb65A@mail.gmail.com","subject":"Re: Regression[2.14.3->2.15]: Interactive rebase fails if submodule is modified","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-11-03T16:06:41Z","receivedAt":"2017-11-03T16:07:09Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Orgad,\n\nOn Thu, 2 Nov 2017, Orgad Shaneh wrote:\n\n> I can't reproduce this with a minimal example, but it happens in my project.\n> \n> What I tried to do for reproducing is:\n> rm -rf super sub\n> mkdir sub; cd sub; git init\n> git commit --allow-empty -m 'Initial commit'\n> mkdir ../super; cd ../super\n> git init\n> git submodule add ../sub\n> touch foo; git add foo sub\n> git commit -m 'Initial commit'\n> touch a; git add a; git commit -m 'a'\n> touch b; git add b; git commit -m 'b'\n> cd sub; git commit --allow-empty -m 'New commit'; cd ..\n> git rebase -i HEAD^^\n> \n> Then drop a.\n> \n> In my project I get:\n> error: cannot rebase: You have unstaged changes.\n> \n> This works fine with 2.14.3.\n\nI tried to turn this into a regression test, but I cannot make it fail:\n\n-- snip --\ndiff --git a/t/t3426-rebase-submodule.sh b/t/t3426-rebase-submodule.sh\nindex ebf4f5e4b2c..55aebe53191 100755\n--- a/t/t3426-rebase-submodule.sh\n+++ b/t/t3426-rebase-submodule.sh\n@@ -20,7 +20,7 @@ git_rebase () {\n \tgit rebase \"$1\"\n }\n \n-test_submodule_switch \"git_rebase\"\n+#test_submodule_switch \"git_rebase\"\n \n git_rebase_interactive () {\n \tgit status -su >expect &&\n@@ -38,6 +38,27 @@ git_rebase_interactive () {\n \tgit rebase -i \"$1\"\n }\n \n-test_submodule_switch \"git_rebase_interactive\"\n+#test_submodule_switch \"git_rebase_interactive\"\n+\n+test_expect_success '123' '\n+\tgit init sub &&\n+\ttest_commit -C sub init-submodule &&\n+\tgit init super &&\n+\tgit -C super submodule add ../sub &&\n+\t(\n+\t\tcd super &&\n+\t\ttest_tick &&\n+\t\ttouch foo &&\n+\t\tgit add sub foo &&\n+\t\tgit commit -m initial &&\n+\t\ttest_commit a &&\n+\t\ttest_commit b &&\n+\t\ttest_commit -C sub new &&\n+\t\tset_fake_editor &&\n+\t\tFAKE_LINES=2 &&\n+\t\texport FAKE_LINES &&\n+\t\tgit rebase -i HEAD^^\n+\t)\n+'\n \n test_done\n-- snap --\n\nCan you help me spot what I did wrong?\n\nCiao,\nDscho\n"},{"id":"331787","messageId":"alpine.DEB.2.21.1.1711031711530.6482@virtualbox","threadId":"47099","inReplyTo":"alpine.DEB.2.21.1.1711031658190.6482@virtualbox","subject":"Re: Regression[2.14.3->2.15]: Interactive rebase fails if submodule is modified","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-11-03T16:20:49Z","receivedAt":"2017-11-03T16:21:11Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Orgad,\n\nOn Fri, 3 Nov 2017, Johannes Schindelin wrote:\n\n> On Thu, 2 Nov 2017, Orgad Shaneh wrote:\n> \n> > I can't reproduce this with a minimal example, but it happens in my project.\n\nWhoa, I somehow overlooked the \"can't\". Sorry.\n\n> > What I tried to do for reproducing is:\n> > rm -rf super sub\n> > mkdir sub; cd sub; git init\n> > git commit --allow-empty -m 'Initial commit'\n> > mkdir ../super; cd ../super\n> > git init\n> > git submodule add ../sub\n> > touch foo; git add foo sub\n> > git commit -m 'Initial commit'\n> > touch a; git add a; git commit -m 'a'\n> > touch b; git add b; git commit -m 'b'\n> > cd sub; git commit --allow-empty -m 'New commit'; cd ..\n> > git rebase -i HEAD^^\n> > \n> > Then drop a.\n> > \n> > In my project I get:\n> > error: cannot rebase: You have unstaged changes.\n> > \n> > This works fine with 2.14.3.\n> \n> I tried to turn this into a regression test, but I cannot make it fail:\n> \n> -- snip --\n> diff --git a/t/t3426-rebase-submodule.sh b/t/t3426-rebase-submodule.sh\n> index ebf4f5e4b2c..55aebe53191 100755\n> --- a/t/t3426-rebase-submodule.sh\n> +++ b/t/t3426-rebase-submodule.sh\n> @@ -20,7 +20,7 @@ git_rebase () {\n>  \tgit rebase \"$1\"\n>  }\n>  \n> -test_submodule_switch \"git_rebase\"\n> +#test_submodule_switch \"git_rebase\"\n>  \n>  git_rebase_interactive () {\n>  \tgit status -su >expect &&\n> @@ -38,6 +38,27 @@ git_rebase_interactive () {\n>  \tgit rebase -i \"$1\"\n>  }\n>  \n> -test_submodule_switch \"git_rebase_interactive\"\n> +#test_submodule_switch \"git_rebase_interactive\"\n> +\n> +test_expect_success '123' '\n> +\tgit init sub &&\n> +\ttest_commit -C sub init-submodule &&\n> +\tgit init super &&\n> +\tgit -C super submodule add ../sub &&\n> +\t(\n> +\t\tcd super &&\n> +\t\ttest_tick &&\n> +\t\ttouch foo &&\n> +\t\tgit add sub foo &&\n> +\t\tgit commit -m initial &&\n> +\t\ttest_commit a &&\n> +\t\ttest_commit b &&\n> +\t\ttest_commit -C sub new &&\n> +\t\tset_fake_editor &&\n> +\t\tFAKE_LINES=2 &&\n> +\t\texport FAKE_LINES &&\n\nI inserted a `git diff-files` here, and it printed exactly what I\nexpected:\n\n++ git diff-files\n:160000 160000 62cab94c8d8cf047bbb60c12def559339300efa4 0000000000000000000000000000000000000000 M      sub\n\n> +\t\tgit rebase -i HEAD^^\n> +\t)\n> +'\n\nThere must be something else going wrong that we did not replicate here.\nMaybe the `error: cannot rebase: You have unstaged changes.` message was\ncaused not by a change in the submodule? Could you run `git diff-files`\nbefore the rebase?\n\nThis does *not* refresh the index, but maybe that is what is going wrong;\nyou could call `git update-index --refresh` before the rebase and see\nwhether that works around the issue?\n\nCiao,\nDscho\n"},{"id":"331827","messageId":"CAGHpTB+23H=iC_uv0K=GajnCBHSVRsUYgGFUn9-bAdcX=azL-w@mail.gmail.com","threadId":"47099","inReplyTo":"alpine.DEB.2.21.1.1711031711530.6482@virtualbox","subject":"Re: Regression[2.14.3->2.15]: Interactive rebase fails if submodule is modified","fromName":"Orgad Shaneh","fromEmail":"orgads@gmail.com","sentAt":"2017-11-04T18:04:24Z","receivedAt":"2017-11-04T18:04:31Z","isPatch":false,"sender":{"key":"orgads@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1246544?v=4"},"body":"On Fri, Nov 3, 2017 at 6:20 PM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> Hi Orgad,\n>\n> On Fri, 3 Nov 2017, Johannes Schindelin wrote:\n>\n>> On Thu, 2 Nov 2017, Orgad Shaneh wrote:\n>>\n>> > I can't reproduce this with a minimal example, but it happens in my project.\n>\n> Whoa, I somehow overlooked the \"can't\". Sorry.\n>\n> I inserted a `git diff-files` here, and it printed exactly what I\n> expected:\n>\n> ++ git diff-files\n> :160000 160000 62cab94c8d8cf047bbb60c12def559339300efa4 0000000000000000000000000000000000000000 M      sub\n>\n>> +             git rebase -i HEAD^^\n>> +     )\n>> +'\n>\n> There must be something else going wrong that we did not replicate here.\n> Maybe the `error: cannot rebase: You have unstaged changes.` message was\n> caused not by a change in the submodule? Could you run `git diff-files`\n> before the rebase?\n\nIt's the same before and during the rebase:\n$ git diff-files\n:160000 160000 c840225a7cf6bb2ec64da9d35d2c29210bc5e5e8\n0000000000000000000000000000000000000000 M      sub\n\n\n>\n> This does *not* refresh the index, but maybe that is what is going wrong;\n> you could call `git update-index --refresh` before the rebase and see\n> whether that works around the issue?\n\nNope.\n\nIf I run git submodule update, then rebase --continue works fine, so\nit's definitely somehow caused by the submodule.\n\n- Orgad\n"},{"id":"331846","messageId":"CAGHpTBJFR2Y+Sg-xQzBpC6qu+NKPDSYyMwSe9Py9FtD2-bRAXg@mail.gmail.com","threadId":"47099","inReplyTo":"CAGHpTB+23H=iC_uv0K=GajnCBHSVRsUYgGFUn9-bAdcX=azL-w@mail.gmail.com","subject":"Re: Regression[2.14.3->2.15]: Interactive rebase fails if submodule is modified","fromName":"Orgad Shaneh","fromEmail":"orgads@gmail.com","sentAt":"2017-11-05T07:30:56Z","receivedAt":"2017-11-05T07:31:02Z","isPatch":false,"sender":{"key":"orgads@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1246544?v=4"},"body":"On Sat, Nov 4, 2017 at 8:04 PM, Orgad Shaneh <orgads@gmail.com> wrote:\n> On Fri, Nov 3, 2017 at 6:20 PM, Johannes Schindelin\n> <Johannes.Schindelin@gmx.de> wrote:\n>> Hi Orgad,\n>>\n>> On Fri, 3 Nov 2017, Johannes Schindelin wrote:\n>>\n>>> On Thu, 2 Nov 2017, Orgad Shaneh wrote:\n>>>\n>>> > I can't reproduce this with a minimal example, but it happens in my project.\n>>\n>> Whoa, I somehow overlooked the \"can't\". Sorry.\n>>\n>> I inserted a `git diff-files` here, and it printed exactly what I\n>> expected:\n>>\n>> ++ git diff-files\n>> :160000 160000 62cab94c8d8cf047bbb60c12def559339300efa4 0000000000000000000000000000000000000000 M      sub\n>>\n>>> +             git rebase -i HEAD^^\n>>> +     )\n>>> +'\n>>\n>> There must be something else going wrong that we did not replicate here.\n>> Maybe the `error: cannot rebase: You have unstaged changes.` message was\n>> caused not by a change in the submodule? Could you run `git diff-files`\n>> before the rebase?\n>\n> It's the same before and during the rebase:\n> $ git diff-files\n> :160000 160000 c840225a7cf6bb2ec64da9d35d2c29210bc5e5e8\n> 0000000000000000000000000000000000000000 M      sub\n>\n>\n>>\n>> This does *not* refresh the index, but maybe that is what is going wrong;\n>> you could call `git update-index --refresh` before the rebase and see\n>> whether that works around the issue?\n>\n> Nope.\n>\n> If I run git submodule update, then rebase --continue works fine, so\n> it's definitely somehow caused by the submodule.\n\nI just checked out v2.15.0.windows.1 and reverted ff6f1f564c - it\nsolves the problem. I still have no idea how to minimally reproduce\n(in my project it's easily reproducible) :)\n\n- Orgad\n"},{"id":"331933","messageId":"20171106183702.GA131418@google.com","threadId":"47099","inReplyTo":"CAGHpTBJFR2Y+Sg-xQzBpC6qu+NKPDSYyMwSe9Py9FtD2-bRAXg@mail.gmail.com","subject":"Re: Regression[2.14.3->2.15]: Interactive rebase fails if submodule is modified","fromName":"Brandon Williams","fromEmail":"bmwill@google.com","sentAt":"2017-11-06T18:37:02Z","receivedAt":"2017-11-06T18:37:12Z","isPatch":false,"sender":{"key":"bwilliams.eng@gmail.com","avatar":null},"body":"On 11/05, Orgad Shaneh wrote:\n> On Sat, Nov 4, 2017 at 8:04 PM, Orgad Shaneh <orgads@gmail.com> wrote:\n> > On Fri, Nov 3, 2017 at 6:20 PM, Johannes Schindelin\n> > <Johannes.Schindelin@gmx.de> wrote:\n> >> Hi Orgad,\n> >>\n> >> On Fri, 3 Nov 2017, Johannes Schindelin wrote:\n> >>\n> >>> On Thu, 2 Nov 2017, Orgad Shaneh wrote:\n> >>>\n> >>> > I can't reproduce this with a minimal example, but it happens in my project.\n> >>\n> >> Whoa, I somehow overlooked the \"can't\". Sorry.\n> >>\n> >> I inserted a `git diff-files` here, and it printed exactly what I\n> >> expected:\n> >>\n> >> ++ git diff-files\n> >> :160000 160000 62cab94c8d8cf047bbb60c12def559339300efa4 0000000000000000000000000000000000000000 M      sub\n> >>\n> >>> +             git rebase -i HEAD^^\n> >>> +     )\n> >>> +'\n> >>\n> >> There must be something else going wrong that we did not replicate here.\n> >> Maybe the `error: cannot rebase: You have unstaged changes.` message was\n> >> caused not by a change in the submodule? Could you run `git diff-files`\n> >> before the rebase?\n> >\n> > It's the same before and during the rebase:\n> > $ git diff-files\n> > :160000 160000 c840225a7cf6bb2ec64da9d35d2c29210bc5e5e8\n> > 0000000000000000000000000000000000000000 M      sub\n> >\n> >\n> >>\n> >> This does *not* refresh the index, but maybe that is what is going wrong;\n> >> you could call `git update-index --refresh` before the rebase and see\n> >> whether that works around the issue?\n> >\n> > Nope.\n> >\n> > If I run git submodule update, then rebase --continue works fine, so\n> > it's definitely somehow caused by the submodule.\n> \n> I just checked out v2.15.0.windows.1 and reverted ff6f1f564c - it\n> solves the problem. I still have no idea how to minimally reproduce\n> (in my project it's easily reproducible) :)\n> \n\nAfter reading your bug report and the fact that you weren't able to\nreproduce it outside of your project I think i figured out what is\nhappening.  Before ff6f1f564c the gitmodules file wasn't being loaded\nunless a codepath explicitly wanted to work with submodules.  Now they\nare being lazy-loaded so if you call into the submodule config subsystem\nit'll work without having to have initialized it before.  I suspect\nthat the submodule which is causing the failure has a\n\"submodule.<name>.ignore\" entry in the .gitmodules file or somewhere in\nyour repositories config (I actually suspect the latter based on the\ncode path).\n\nWhen rebase calls into the diff machinery to see if there are unstaged\nchanges it explicitly requests that submodule's be ignored, but this\ndesired gets overridden by your repository's config, clearing the\nignored flag and making rebase actually pay attention to the fact that\nthe submodule has changes in it.\n\nI don't have a patch available to for you to test just yet (but I'll\nhave some time later today to write one up) but could you verify that\n(1) you have an ignore entry for the submodule in question in your\nconfig and (2) removing it from your config avoids the failure?  If\nthat's the case then we would be able to put together a reproducible\nrecipe for this failure.\n\n-- \nBrandon Williams\n"},{"id":"331937","messageId":"CAGHpTBJ9QpEeumzZuO2DeNS-6a6oL2Vn0WNZrm1nt0qFcLfJyw@mail.gmail.com","threadId":"47099","inReplyTo":"20171106183702.GA131418@google.com","subject":"Re: Regression[2.14.3->2.15]: Interactive rebase fails if submodule is modified","fromName":"Orgad Shaneh","fromEmail":"orgads@gmail.com","sentAt":"2017-11-06T20:36:18Z","receivedAt":"2017-11-06T20:36:24Z","isPatch":false,"sender":{"key":"orgads@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1246544?v=4"},"body":"On Mon, Nov 6, 2017 at 8:37 PM, Brandon Williams <bmwill@google.com> wrote:\n\n> After reading your bug report and the fact that you weren't able to\n> reproduce it outside of your project I think i figured out what is\n> happening.  Before ff6f1f564c the gitmodules file wasn't being loaded\n> unless a codepath explicitly wanted to work with submodules.  Now they\n> are being lazy-loaded so if you call into the submodule config subsystem\n> it'll work without having to have initialized it before.  I suspect\n> that the submodule which is causing the failure has a\n> \"submodule.<name>.ignore\" entry in the .gitmodules file or somewhere in\n> your repositories config (I actually suspect the latter based on the\n> code path).\n>\n> When rebase calls into the diff machinery to see if there are unstaged\n> changes it explicitly requests that submodule's be ignored, but this\n> desired gets overridden by your repository's config, clearing the\n> ignored flag and making rebase actually pay attention to the fact that\n> the submodule has changes in it.\n>\n> I don't have a patch available to for you to test just yet (but I'll\n> have some time later today to write one up) but could you verify that\n> (1) you have an ignore entry for the submodule in question in your\n> config and (2) removing it from your config avoids the failure?  If\n> that's the case then we would be able to put together a reproducible\n> recipe for this failure.\n\nYou're right. Thanks for the info. I have ignore = dirty, and removing\nit from the config solves the problem indeed.\n\nThe following script reproduces the bug (it's the same as before, only\nadded git config):\n\nrm -rf super sub\nmkdir sub; cd sub; git init\ngit commit --allow-empty -m 'Initial commit'\nmkdir ../super; cd ../super\ngit init\ngit submodule add ../sub\ngit config submodule.sub.ignore dirty\ntouch foo; git add foo sub\ngit commit -m 'Initial commit'\ntouch a; git add a; git commit -m 'a'\ntouch b; git add b; git commit -m 'b'\ncd sub; git commit --allow-empty -m 'New commit'; cd ..\ngit rebase -i HEAD^^\n\n- Orgad\n"}]}