{"thread":{"id":"39048","subject":"Rebasing with submodule change causes red herring with --continue","startedAt":"2015-04-10T16:30:20Z","lastAt":"2015-04-27T21:09:11Z","messageCount":8,"participants":["Robert Dailey","John Keeping","Jens Lehmann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"259226","messageId":"CAHd499AqCJ5N1GP6mBJZB7-9vWPNjtia1G7PHoSY3d=Zovv7UA@mail.gmail.com","threadId":"39048","inReplyTo":null,"subject":"Rebasing with submodule change causes red herring with --continue","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2015-04-10T16:30:20Z","receivedAt":"2015-04-10T16:30:20Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"I have a branch that contains a commit with a single change: A\nsubmodule pointing to a new SHA1.\n\nWhen I rebase this branch onto the tip of its parent branch AND that\nparent branch had modified that same submodule, the rebase stops at\nthe commit on my branch that modified the submodule and asks me if I\nwant to keep REMOTE or LOCAL. I say LOCAL and notice immediately that\nthe submodule is not staged (normally it would be).\n\nI do:\n\n$ git add my-submodule\n\nThen I do:\n\n$ git rebase --continue\n\nAt this point, it fails asking me if I forgot to stage changes and\nrecommends doing --skip. This is normally what you would see if the\nstaging area was completely empty, however it isn't, since I see the\nsubmodule is in there.\n\nIs this a bug or am I missing a fundamental here? I'm using Git 2.1.0\non Windows through MSYS. I'll provide more concrete examples if my\nsummary of the issue doesn't \"ring any bells\".\n"},{"id":"259230","messageId":"20150410164413.GL21452@serenity.lan","threadId":"39048","inReplyTo":"CAHd499AqCJ5N1GP6mBJZB7-9vWPNjtia1G7PHoSY3d=Zovv7UA@mail.gmail.com","subject":"Re: Rebasing with submodule change causes red herring with --continue","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2015-04-10T16:44:13Z","receivedAt":"2015-04-10T16:44:13Z","isPatch":false,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"On Fri, Apr 10, 2015 at 11:30:20AM -0500, Robert Dailey wrote:\n> I have a branch that contains a commit with a single change: A\n> submodule pointing to a new SHA1.\n> \n> When I rebase this branch onto the tip of its parent branch AND that\n> parent branch had modified that same submodule, the rebase stops at\n> the commit on my branch that modified the submodule and asks me if I\n> want to keep REMOTE or LOCAL. I say LOCAL and notice immediately that\n> the submodule is not staged (normally it would be).\n> \n> I do:\n> \n> $ git add my-submodule\n> \n> Then I do:\n> \n> $ git rebase --continue\n> \n> At this point, it fails asking me if I forgot to stage changes and\n> recommends doing --skip. This is normally what you would see if the\n> staging area was completely empty, however it isn't, since I see the\n> submodule is in there.\n> \n> Is this a bug or am I missing a fundamental here? I'm using Git 2.1.0\n> on Windows through MSYS. I'll provide more concrete examples if my\n> summary of the issue doesn't \"ring any bells\".\n\nI hit something similar in the past, but it was fixed with commit\na6754cd (rebase -i continue: don't skip commits that only change\nsubmodules, 2012-04-07) so I think you must be hitting a slightly\ndifferent problem, although the tests added in that commit look like\nthey do test the scenario you describe (specifically 'rebase -i continue\nwith only submodule staged').\n"},{"id":"259904","messageId":"CAHd499D-UX-0_HhoVWuitN960BdKtB_JonbxgLRqwU3ktFW4Sg@mail.gmail.com","threadId":"39048","inReplyTo":"20150410164413.GL21452@serenity.lan","subject":"Re: Rebasing with submodule change causes red herring with --continue","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2015-04-23T18:17:08Z","receivedAt":"2015-04-23T18:17:08Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"On Fri, Apr 10, 2015 at 11:44 AM, John Keeping <john@keeping.me.uk> wrote:\n> On Fri, Apr 10, 2015 at 11:30:20AM -0500, Robert Dailey wrote:\n>> I have a branch that contains a commit with a single change: A\n>> submodule pointing to a new SHA1.\n>>\n>> When I rebase this branch onto the tip of its parent branch AND that\n>> parent branch had modified that same submodule, the rebase stops at\n>> the commit on my branch that modified the submodule and asks me if I\n>> want to keep REMOTE or LOCAL. I say LOCAL and notice immediately that\n>> the submodule is not staged (normally it would be).\n>>\n>> I do:\n>>\n>> $ git add my-submodule\n>>\n>> Then I do:\n>>\n>> $ git rebase --continue\n>>\n>> At this point, it fails asking me if I forgot to stage changes and\n>> recommends doing --skip. This is normally what you would see if the\n>> staging area was completely empty, however it isn't, since I see the\n>> submodule is in there.\n>>\n>> Is this a bug or am I missing a fundamental here? I'm using Git 2.1.0\n>> on Windows through MSYS. I'll provide more concrete examples if my\n>> summary of the issue doesn't \"ring any bells\".\n>\n> I hit something similar in the past, but it was fixed with commit\n> a6754cd (rebase -i continue: don't skip commits that only change\n> submodules, 2012-04-07) so I think you must be hitting a slightly\n> different problem, although the tests added in that commit look like\n> they do test the scenario you describe (specifically 'rebase -i continue\n> with only submodule staged').\n\nI am still running into this issue on git 2.3.5 on Windows. Logs\nbelow. One interesting thing to note in the git trace output is that\nit is specifying --ignore-submodules option to `git diff-files` during\nthe rebase continue. Is this due to a configuration option? It seems\nlike git should not be ignoring submodules when continuing a rebase\n(this should only affect direct calls to diff)\n\n\n|-- Robert@M5536:/e/code/frontend (timeline-ids-develop|REBASE 3/3) --|\n$ git status\nrebase in progress; onto bb05e7c\nYou are currently rebasing branch 'timeline-ids-develop' on 'bb05e7c'.\n  (all conflicts fixed: run \"git rebase --continue\")\n\nChanges to be committed:\n  (use \"git reset HEAD <file>...\" to unstage)\n\n        modified:   Core\n\nChanges not staged for commit:\n  (use \"git add <file>...\" to update what will be committed)\n  (use \"git checkout -- <file>...\" to discard changes in working directory)\n\n        modified:   Core (new commits)\n\nUntracked files:\n  (use \"git add <file>...\" to include in what will be committed)\n\n        Tools/FontTool/\n\n\n|-- Robert@M5536:/e/code/frontend (timeline-ids-develop|REBASE 3/3) --|\n$ GIT_TRACE=1 git rebase --continue\n19:15:33.569945 git.c:557               trace: exec: 'git-rebase' '--continue'\n19:15:33.569945 run-command.c:351       trace: run_command:\n'git-rebase' '--continue'\n19:15:33.775097 git.c:348               trace: built-in: git\n'rev-parse' '--parseopt' '--stuck-long' '--' '--continue'\n19:15:33.931190 git.c:348               trace: built-in: git\n'rev-parse' '--git-dir'\n19:15:34.007242 git.c:348               trace: built-in: git\n'rev-parse' '--is-bare-repository'\n19:15:34.059280 git.c:348               trace: built-in: git\n'rev-parse' '--show-toplevel'\n19:15:34.148343 git.c:348               trace: built-in: git 'config'\n'--bool' 'rebase.stat'\n19:15:34.227399 git.c:348               trace: built-in: git 'config'\n'--bool' 'rebase.autostash'\n19:15:34.280437 git.c:348               trace: built-in: git 'config'\n'--bool' 'rebase.autosquash'\n19:15:34.335476 git.c:348               trace: built-in: git\n'rev-parse' '--verify' 'HEAD'\n19:15:34.389515 git.c:348               trace: built-in: git\n'update-index' '--ignore-submodules' '--refresh'\n19:15:34.554631 git.c:348               trace: built-in: git\n'diff-files' '--quiet' '--ignore-submodules'\n19:15:34.902879 git.c:557               trace: exec: 'git-am'\n'--resolved' '--resolvemsg=\nWhen you have resolved this problem, run \"git rebase --continue\".\nIf you prefer to skip this patch, run \"git rebase --skip\" instead.\nTo check out the original branch and stop rebasing, run \"git rebase --abort\".\n'\n19:15:34.902879 run-command.c:351       trace: run_command: 'git-am'\n'--resolved' '--resolvemsg=\nWhen you have resolved this problem, run \"git rebase --continue\".\nIf you prefer to skip this patch, run \"git rebase --skip\" instead.\nTo check out the original branch and stop rebasing, run \"git rebase --abort\".\n'\n19:15:35.113028 git.c:348               trace: built-in: git\n'rev-parse' '--parseopt' '--stuck-long' '--' '--resolved'\n'--resolvemsg=\nWhen you have resolved this problem, run \"git rebase --continue\".\nIf you prefer to skip this patch, run \"git rebase --skip\" instead.\nTo check out the original branch and stop rebasing, run \"git rebase --abort\".\n'\n19:15:35.290155 git.c:348               trace: built-in: git\n'rev-parse' '--git-dir'\n19:15:35.387224 git.c:348               trace: built-in: git\n'rev-parse' '--show-prefix'\n19:15:35.541332 git.c:348               trace: built-in: git\n'rev-parse' '--show-toplevel'\n19:15:35.598374 git.c:348               trace: built-in: git 'var'\n'GIT_COMMITTER_IDENT'\n19:15:35.659417 git.c:348               trace: built-in: git\n'rev-parse' '--verify' '-q' 'HEAD'\n19:15:35.724462 git.c:348               trace: built-in: git 'config'\n'--bool' '--get' 'am.messageid'\n19:15:35.811524 git.c:348               trace: built-in: git 'config'\n'--bool' '--get' 'am.keepcr'\n19:15:36.037685 git.c:348               trace: built-in: git\n'update-index' '-q' '--refresh'\n19:15:37.057409 git.c:557               trace: exec:\n'git-sh-i18n--envsubst' '--variables' 'Applying: $FIRSTLINE'\n19:15:37.057409 run-command.c:351       trace: run_command:\n'git-sh-i18n--envsubst' '--variables' 'Applying: $FIRSTLINE'\n19:15:37.178495 git.c:557               trace: exec:\n'git-sh-i18n--envsubst' 'Applying: $FIRSTLINE'\n19:15:37.178495 run-command.c:351       trace: run_command:\n'git-sh-i18n--envsubst' 'Applying: $FIRSTLINE'\nApplying: TEMP: Update Core submodule\n19:15:37.360624 git.c:348               trace: built-in: git\n'diff-index' '--ignore-submodules' '--quiet' '--cached' 'HEAD' '--'\nNo changes - did you forget to use 'git add'?\nIf there is nothing left to stage, chances are that something else\nalready introduced the same changes; you might want to skip this patch.\n\nWhen you have resolved this problem, run \"git rebase --continue\".\nIf you prefer to skip this patch, run \"git rebase --skip\" instead.\nTo check out the original branch and stop rebasing, run \"git rebase --abort\".\n\n19:15:37.456694 git.c:348               trace: built-in: git\n'rev-parse' '--verify' '-q' 'HEAD'\n"},{"id":"259908","messageId":"CAHd499A9k+DZHg-Am_STyRJFwMMT_vi9DtBZqDmNRvsJJ7gxNA@mail.gmail.com","threadId":"39048","inReplyTo":"CAHd499D-UX-0_HhoVWuitN960BdKtB_JonbxgLRqwU3ktFW4Sg@mail.gmail.com","subject":"Re: Rebasing with submodule change causes red herring with --continue","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2015-04-23T19:07:16Z","receivedAt":"2015-04-23T19:07:16Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"On Thu, Apr 23, 2015 at 1:17 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:\n> On Fri, Apr 10, 2015 at 11:44 AM, John Keeping <john@keeping.me.uk> wrote:\n>> On Fri, Apr 10, 2015 at 11:30:20AM -0500, Robert Dailey wrote:\n>>> I have a branch that contains a commit with a single change: A\n>>> submodule pointing to a new SHA1.\n>>>\n>>> When I rebase this branch onto the tip of its parent branch AND that\n>>> parent branch had modified that same submodule, the rebase stops at\n>>> the commit on my branch that modified the submodule and asks me if I\n>>> want to keep REMOTE or LOCAL. I say LOCAL and notice immediately that\n>>> the submodule is not staged (normally it would be).\n>>>\n>>> I do:\n>>>\n>>> $ git add my-submodule\n>>>\n>>> Then I do:\n>>>\n>>> $ git rebase --continue\n>>>\n>>> At this point, it fails asking me if I forgot to stage changes and\n>>> recommends doing --skip. This is normally what you would see if the\n>>> staging area was completely empty, however it isn't, since I see the\n>>> submodule is in there.\n>>>\n>>> Is this a bug or am I missing a fundamental here? I'm using Git 2.1.0\n>>> on Windows through MSYS. I'll provide more concrete examples if my\n>>> summary of the issue doesn't \"ring any bells\".\n>>\n>> I hit something similar in the past, but it was fixed with commit\n>> a6754cd (rebase -i continue: don't skip commits that only change\n>> submodules, 2012-04-07) so I think you must be hitting a slightly\n>> different problem, although the tests added in that commit look like\n>> they do test the scenario you describe (specifically 'rebase -i continue\n>> with only submodule staged').\n>\n> I am still running into this issue on git 2.3.5 on Windows. Logs\n> below. One interesting thing to note in the git trace output is that\n> it is specifying --ignore-submodules option to `git diff-files` during\n> the rebase continue. Is this due to a configuration option? It seems\n> like git should not be ignoring submodules when continuing a rebase\n> (this should only affect direct calls to diff)\n>\n>\n> |-- Robert@M5536:/e/code/frontend (timeline-ids-develop|REBASE 3/3) --|\n> $ git status\n> rebase in progress; onto bb05e7c\n> You are currently rebasing branch 'timeline-ids-develop' on 'bb05e7c'.\n>   (all conflicts fixed: run \"git rebase --continue\")\n>\n> Changes to be committed:\n>   (use \"git reset HEAD <file>...\" to unstage)\n>\n>         modified:   Core\n>\n> Changes not staged for commit:\n>   (use \"git add <file>...\" to update what will be committed)\n>   (use \"git checkout -- <file>...\" to discard changes in working directory)\n>\n>         modified:   Core (new commits)\n>\n> Untracked files:\n>   (use \"git add <file>...\" to include in what will be committed)\n>\n>         Tools/FontTool/\n>\n>\n> |-- Robert@M5536:/e/code/frontend (timeline-ids-develop|REBASE 3/3) --|\n> $ GIT_TRACE=1 git rebase --continue\n> 19:15:33.569945 git.c:557               trace: exec: 'git-rebase' '--continue'\n> 19:15:33.569945 run-command.c:351       trace: run_command:\n> 'git-rebase' '--continue'\n> 19:15:33.775097 git.c:348               trace: built-in: git\n> 'rev-parse' '--parseopt' '--stuck-long' '--' '--continue'\n> 19:15:33.931190 git.c:348               trace: built-in: git\n> 'rev-parse' '--git-dir'\n> 19:15:34.007242 git.c:348               trace: built-in: git\n> 'rev-parse' '--is-bare-repository'\n> 19:15:34.059280 git.c:348               trace: built-in: git\n> 'rev-parse' '--show-toplevel'\n> 19:15:34.148343 git.c:348               trace: built-in: git 'config'\n> '--bool' 'rebase.stat'\n> 19:15:34.227399 git.c:348               trace: built-in: git 'config'\n> '--bool' 'rebase.autostash'\n> 19:15:34.280437 git.c:348               trace: built-in: git 'config'\n> '--bool' 'rebase.autosquash'\n> 19:15:34.335476 git.c:348               trace: built-in: git\n> 'rev-parse' '--verify' 'HEAD'\n> 19:15:34.389515 git.c:348               trace: built-in: git\n> 'update-index' '--ignore-submodules' '--refresh'\n> 19:15:34.554631 git.c:348               trace: built-in: git\n> 'diff-files' '--quiet' '--ignore-submodules'\n> 19:15:34.902879 git.c:557               trace: exec: 'git-am'\n> '--resolved' '--resolvemsg=\n> When you have resolved this problem, run \"git rebase --continue\".\n> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n> '\n> 19:15:34.902879 run-command.c:351       trace: run_command: 'git-am'\n> '--resolved' '--resolvemsg=\n> When you have resolved this problem, run \"git rebase --continue\".\n> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n> '\n> 19:15:35.113028 git.c:348               trace: built-in: git\n> 'rev-parse' '--parseopt' '--stuck-long' '--' '--resolved'\n> '--resolvemsg=\n> When you have resolved this problem, run \"git rebase --continue\".\n> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n> '\n> 19:15:35.290155 git.c:348               trace: built-in: git\n> 'rev-parse' '--git-dir'\n> 19:15:35.387224 git.c:348               trace: built-in: git\n> 'rev-parse' '--show-prefix'\n> 19:15:35.541332 git.c:348               trace: built-in: git\n> 'rev-parse' '--show-toplevel'\n> 19:15:35.598374 git.c:348               trace: built-in: git 'var'\n> 'GIT_COMMITTER_IDENT'\n> 19:15:35.659417 git.c:348               trace: built-in: git\n> 'rev-parse' '--verify' '-q' 'HEAD'\n> 19:15:35.724462 git.c:348               trace: built-in: git 'config'\n> '--bool' '--get' 'am.messageid'\n> 19:15:35.811524 git.c:348               trace: built-in: git 'config'\n> '--bool' '--get' 'am.keepcr'\n> 19:15:36.037685 git.c:348               trace: built-in: git\n> 'update-index' '-q' '--refresh'\n> 19:15:37.057409 git.c:557               trace: exec:\n> 'git-sh-i18n--envsubst' '--variables' 'Applying: $FIRSTLINE'\n> 19:15:37.057409 run-command.c:351       trace: run_command:\n> 'git-sh-i18n--envsubst' '--variables' 'Applying: $FIRSTLINE'\n> 19:15:37.178495 git.c:557               trace: exec:\n> 'git-sh-i18n--envsubst' 'Applying: $FIRSTLINE'\n> 19:15:37.178495 run-command.c:351       trace: run_command:\n> 'git-sh-i18n--envsubst' 'Applying: $FIRSTLINE'\n> Applying: TEMP: Update Core submodule\n> 19:15:37.360624 git.c:348               trace: built-in: git\n> 'diff-index' '--ignore-submodules' '--quiet' '--cached' 'HEAD' '--'\n> No changes - did you forget to use 'git add'?\n> If there is nothing left to stage, chances are that something else\n> already introduced the same changes; you might want to skip this patch.\n>\n> When you have resolved this problem, run \"git rebase --continue\".\n> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n>\n> 19:15:37.456694 git.c:348               trace: built-in: git\n> 'rev-parse' '--verify' '-q' 'HEAD'\n\n\nFor reference, I found an existing mailing list discussion on this\nfrom a few years ago:\nhttp://git.661346.n2.nabble.com/Interactive-rebase-with-submodules-td7197519.html\n\nApparently a patch was proposed, i do not know if it made it in a\nrelease of Git. But based on what I'm seeing right now, it seems that\nit did not.\n"},{"id":"259911","messageId":"55394B70.4020403@web.de","threadId":"39048","inReplyTo":"CAHd499A9k+DZHg-Am_STyRJFwMMT_vi9DtBZqDmNRvsJJ7gxNA@mail.gmail.com","subject":"Re: Rebasing with submodule change causes red herring with --continue","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2015-04-23T19:43:44Z","receivedAt":"2015-04-23T19:43:44Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 23.04.2015 um 21:07 schrieb Robert Dailey:\n> On Thu, Apr 23, 2015 at 1:17 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:\n>> On Fri, Apr 10, 2015 at 11:44 AM, John Keeping <john@keeping.me.uk> wrote:\n>>> On Fri, Apr 10, 2015 at 11:30:20AM -0500, Robert Dailey wrote:\n>>>> I have a branch that contains a commit with a single change: A\n>>>> submodule pointing to a new SHA1.\n>>>>\n>>>> When I rebase this branch onto the tip of its parent branch AND that\n>>>> parent branch had modified that same submodule, the rebase stops at\n>>>> the commit on my branch that modified the submodule and asks me if I\n>>>> want to keep REMOTE or LOCAL. I say LOCAL and notice immediately that\n>>>> the submodule is not staged (normally it would be).\n>>>>\n>>>> I do:\n>>>>\n>>>> $ git add my-submodule\n>>>>\n>>>> Then I do:\n>>>>\n>>>> $ git rebase --continue\n>>>>\n>>>> At this point, it fails asking me if I forgot to stage changes and\n>>>> recommends doing --skip. This is normally what you would see if the\n>>>> staging area was completely empty, however it isn't, since I see the\n>>>> submodule is in there.\n>>>>\n>>>> Is this a bug or am I missing a fundamental here? I'm using Git 2.1.0\n>>>> on Windows through MSYS. I'll provide more concrete examples if my\n>>>> summary of the issue doesn't \"ring any bells\".\n>>>\n>>> I hit something similar in the past, but it was fixed with commit\n>>> a6754cd (rebase -i continue: don't skip commits that only change\n>>> submodules, 2012-04-07) so I think you must be hitting a slightly\n>>> different problem, although the tests added in that commit look like\n>>> they do test the scenario you describe (specifically 'rebase -i continue\n>>> with only submodule staged').\n>>\n>> I am still running into this issue on git 2.3.5 on Windows. Logs\n>> below. One interesting thing to note in the git trace output is that\n>> it is specifying --ignore-submodules option to `git diff-files` during\n>> the rebase continue. Is this due to a configuration option? It seems\n>> like git should not be ignoring submodules when continuing a rebase\n>> (this should only affect direct calls to diff)\n>>\n>>\n>> |-- Robert@M5536:/e/code/frontend (timeline-ids-develop|REBASE 3/3) --|\n>> $ git status\n>> rebase in progress; onto bb05e7c\n>> You are currently rebasing branch 'timeline-ids-develop' on 'bb05e7c'.\n>>    (all conflicts fixed: run \"git rebase --continue\")\n>>\n>> Changes to be committed:\n>>    (use \"git reset HEAD <file>...\" to unstage)\n>>\n>>          modified:   Core\n>>\n>> Changes not staged for commit:\n>>    (use \"git add <file>...\" to update what will be committed)\n>>    (use \"git checkout -- <file>...\" to discard changes in working directory)\n>>\n>>          modified:   Core (new commits)\n>>\n>> Untracked files:\n>>    (use \"git add <file>...\" to include in what will be committed)\n>>\n>>          Tools/FontTool/\n>>\n>>\n>> |-- Robert@M5536:/e/code/frontend (timeline-ids-develop|REBASE 3/3) --|\n>> $ GIT_TRACE=1 git rebase --continue\n>> 19:15:33.569945 git.c:557               trace: exec: 'git-rebase' '--continue'\n>> 19:15:33.569945 run-command.c:351       trace: run_command:\n>> 'git-rebase' '--continue'\n>> 19:15:33.775097 git.c:348               trace: built-in: git\n>> 'rev-parse' '--parseopt' '--stuck-long' '--' '--continue'\n>> 19:15:33.931190 git.c:348               trace: built-in: git\n>> 'rev-parse' '--git-dir'\n>> 19:15:34.007242 git.c:348               trace: built-in: git\n>> 'rev-parse' '--is-bare-repository'\n>> 19:15:34.059280 git.c:348               trace: built-in: git\n>> 'rev-parse' '--show-toplevel'\n>> 19:15:34.148343 git.c:348               trace: built-in: git 'config'\n>> '--bool' 'rebase.stat'\n>> 19:15:34.227399 git.c:348               trace: built-in: git 'config'\n>> '--bool' 'rebase.autostash'\n>> 19:15:34.280437 git.c:348               trace: built-in: git 'config'\n>> '--bool' 'rebase.autosquash'\n>> 19:15:34.335476 git.c:348               trace: built-in: git\n>> 'rev-parse' '--verify' 'HEAD'\n>> 19:15:34.389515 git.c:348               trace: built-in: git\n>> 'update-index' '--ignore-submodules' '--refresh'\n>> 19:15:34.554631 git.c:348               trace: built-in: git\n>> 'diff-files' '--quiet' '--ignore-submodules'\n>> 19:15:34.902879 git.c:557               trace: exec: 'git-am'\n>> '--resolved' '--resolvemsg=\n>> When you have resolved this problem, run \"git rebase --continue\".\n>> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n>> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n>> '\n>> 19:15:34.902879 run-command.c:351       trace: run_command: 'git-am'\n>> '--resolved' '--resolvemsg=\n>> When you have resolved this problem, run \"git rebase --continue\".\n>> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n>> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n>> '\n>> 19:15:35.113028 git.c:348               trace: built-in: git\n>> 'rev-parse' '--parseopt' '--stuck-long' '--' '--resolved'\n>> '--resolvemsg=\n>> When you have resolved this problem, run \"git rebase --continue\".\n>> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n>> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n>> '\n>> 19:15:35.290155 git.c:348               trace: built-in: git\n>> 'rev-parse' '--git-dir'\n>> 19:15:35.387224 git.c:348               trace: built-in: git\n>> 'rev-parse' '--show-prefix'\n>> 19:15:35.541332 git.c:348               trace: built-in: git\n>> 'rev-parse' '--show-toplevel'\n>> 19:15:35.598374 git.c:348               trace: built-in: git 'var'\n>> 'GIT_COMMITTER_IDENT'\n>> 19:15:35.659417 git.c:348               trace: built-in: git\n>> 'rev-parse' '--verify' '-q' 'HEAD'\n>> 19:15:35.724462 git.c:348               trace: built-in: git 'config'\n>> '--bool' '--get' 'am.messageid'\n>> 19:15:35.811524 git.c:348               trace: built-in: git 'config'\n>> '--bool' '--get' 'am.keepcr'\n>> 19:15:36.037685 git.c:348               trace: built-in: git\n>> 'update-index' '-q' '--refresh'\n>> 19:15:37.057409 git.c:557               trace: exec:\n>> 'git-sh-i18n--envsubst' '--variables' 'Applying: $FIRSTLINE'\n>> 19:15:37.057409 run-command.c:351       trace: run_command:\n>> 'git-sh-i18n--envsubst' '--variables' 'Applying: $FIRSTLINE'\n>> 19:15:37.178495 git.c:557               trace: exec:\n>> 'git-sh-i18n--envsubst' 'Applying: $FIRSTLINE'\n>> 19:15:37.178495 run-command.c:351       trace: run_command:\n>> 'git-sh-i18n--envsubst' 'Applying: $FIRSTLINE'\n>> Applying: TEMP: Update Core submodule\n>> 19:15:37.360624 git.c:348               trace: built-in: git\n>> 'diff-index' '--ignore-submodules' '--quiet' '--cached' 'HEAD' '--'\n>> No changes - did you forget to use 'git add'?\n>> If there is nothing left to stage, chances are that something else\n>> already introduced the same changes; you might want to skip this patch.\n>>\n>> When you have resolved this problem, run \"git rebase --continue\".\n>> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n>> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n>>\n>> 19:15:37.456694 git.c:348               trace: built-in: git\n>> 'rev-parse' '--verify' '-q' 'HEAD'\n>\n>\n> For reference, I found an existing mailing list discussion on this\n> from a few years ago:\n> http://git.661346.n2.nabble.com/Interactive-rebase-with-submodules-td7197519.html\n>\n> Apparently a patch was proposed, i do not know if it made it in a\n> release of Git. But based on what I'm seeing right now, it seems that\n> it did not.\n\nNope, this patch made it in at the a6754cda change John mentioned.\nBut while working on recursive submodule update I got the impression\nthat possibly some of the '--ignore-submodule' options used in the\ngit scripts should be changed to '--ignore-submodule=dirty', but I\ndidn't find the time yet to confirm that hypothesis (I'm currently\nconcentrating on those builtins that use unpack_trees() directly).\n"},{"id":"259916","messageId":"20150423203538.GC16113@serenity.lan","threadId":"39048","inReplyTo":"55394B70.4020403@web.de","subject":"Re: Rebasing with submodule change causes red herring with --continue","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2015-04-23T20:35:38Z","receivedAt":"2015-04-23T20:35:38Z","isPatch":false,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"On Thu, Apr 23, 2015 at 09:43:44PM +0200, Jens Lehmann wrote:\n> Am 23.04.2015 um 21:07 schrieb Robert Dailey:\n> > On Thu, Apr 23, 2015 at 1:17 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:\n> >> On Fri, Apr 10, 2015 at 11:44 AM, John Keeping <john@keeping.me.uk> wrote:\n> >>> On Fri, Apr 10, 2015 at 11:30:20AM -0500, Robert Dailey wrote:\n> >>>> I have a branch that contains a commit with a single change: A\n> >>>> submodule pointing to a new SHA1.\n> >>>>\n> >>>> When I rebase this branch onto the tip of its parent branch AND that\n> >>>> parent branch had modified that same submodule, the rebase stops at\n> >>>> the commit on my branch that modified the submodule and asks me if I\n> >>>> want to keep REMOTE or LOCAL. I say LOCAL and notice immediately that\n> >>>> the submodule is not staged (normally it would be).\n> >>>>\n> >>>> I do:\n> >>>>\n> >>>> $ git add my-submodule\n> >>>>\n> >>>> Then I do:\n> >>>>\n> >>>> $ git rebase --continue\n> >>>>\n> >>>> At this point, it fails asking me if I forgot to stage changes and\n> >>>> recommends doing --skip. This is normally what you would see if the\n> >>>> staging area was completely empty, however it isn't, since I see the\n> >>>> submodule is in there.\n> >>>>\n> >>>> Is this a bug or am I missing a fundamental here? I'm using Git 2.1.0\n> >>>> on Windows through MSYS. I'll provide more concrete examples if my\n> >>>> summary of the issue doesn't \"ring any bells\".\n> >>>\n> >>> I hit something similar in the past, but it was fixed with commit\n> >>> a6754cd (rebase -i continue: don't skip commits that only change\n> >>> submodules, 2012-04-07) so I think you must be hitting a slightly\n> >>> different problem, although the tests added in that commit look like\n> >>> they do test the scenario you describe (specifically 'rebase -i continue\n> >>> with only submodule staged').\n> >>\n> >> I am still running into this issue on git 2.3.5 on Windows. Logs\n> >> below. One interesting thing to note in the git trace output is that\n> >> it is specifying --ignore-submodules option to `git diff-files` during\n> >> the rebase continue. Is this due to a configuration option? It seems\n> >> like git should not be ignoring submodules when continuing a rebase\n> >> (this should only affect direct calls to diff)\n> >>\n> >>\n> >> |-- Robert@M5536:/e/code/frontend (timeline-ids-develop|REBASE 3/3) --|\n> >> $ git status\n> >> rebase in progress; onto bb05e7c\n> >> You are currently rebasing branch 'timeline-ids-develop' on 'bb05e7c'.\n> >>    (all conflicts fixed: run \"git rebase --continue\")\n> >>\n> >> Changes to be committed:\n> >>    (use \"git reset HEAD <file>...\" to unstage)\n> >>\n> >>          modified:   Core\n> >>\n> >> Changes not staged for commit:\n> >>    (use \"git add <file>...\" to update what will be committed)\n> >>    (use \"git checkout -- <file>...\" to discard changes in working directory)\n> >>\n> >>          modified:   Core (new commits)\n> >>\n> >> Untracked files:\n> >>    (use \"git add <file>...\" to include in what will be committed)\n> >>\n> >>          Tools/FontTool/\n> >>\n> >>\n> >> |-- Robert@M5536:/e/code/frontend (timeline-ids-develop|REBASE 3/3) --|\n> >> $ GIT_TRACE=1 git rebase --continue\n> >> 19:15:33.569945 git.c:557               trace: exec: 'git-rebase' '--continue'\n> >> 19:15:33.569945 run-command.c:351       trace: run_command:\n> >> 'git-rebase' '--continue'\n> >> 19:15:33.775097 git.c:348               trace: built-in: git\n> >> 'rev-parse' '--parseopt' '--stuck-long' '--' '--continue'\n> >> 19:15:33.931190 git.c:348               trace: built-in: git\n> >> 'rev-parse' '--git-dir'\n> >> 19:15:34.007242 git.c:348               trace: built-in: git\n> >> 'rev-parse' '--is-bare-repository'\n> >> 19:15:34.059280 git.c:348               trace: built-in: git\n> >> 'rev-parse' '--show-toplevel'\n> >> 19:15:34.148343 git.c:348               trace: built-in: git 'config'\n> >> '--bool' 'rebase.stat'\n> >> 19:15:34.227399 git.c:348               trace: built-in: git 'config'\n> >> '--bool' 'rebase.autostash'\n> >> 19:15:34.280437 git.c:348               trace: built-in: git 'config'\n> >> '--bool' 'rebase.autosquash'\n> >> 19:15:34.335476 git.c:348               trace: built-in: git\n> >> 'rev-parse' '--verify' 'HEAD'\n> >> 19:15:34.389515 git.c:348               trace: built-in: git\n> >> 'update-index' '--ignore-submodules' '--refresh'\n> >> 19:15:34.554631 git.c:348               trace: built-in: git\n> >> 'diff-files' '--quiet' '--ignore-submodules'\n> >> 19:15:34.902879 git.c:557               trace: exec: 'git-am'\n> >> '--resolved' '--resolvemsg=\n> >> When you have resolved this problem, run \"git rebase --continue\".\n> >> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n> >> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n> >> '\n> >> 19:15:34.902879 run-command.c:351       trace: run_command: 'git-am'\n> >> '--resolved' '--resolvemsg=\n> >> When you have resolved this problem, run \"git rebase --continue\".\n> >> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n> >> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n> >> '\n> >> 19:15:35.113028 git.c:348               trace: built-in: git\n> >> 'rev-parse' '--parseopt' '--stuck-long' '--' '--resolved'\n> >> '--resolvemsg=\n> >> When you have resolved this problem, run \"git rebase --continue\".\n> >> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n> >> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n> >> '\n> >> 19:15:35.290155 git.c:348               trace: built-in: git\n> >> 'rev-parse' '--git-dir'\n> >> 19:15:35.387224 git.c:348               trace: built-in: git\n> >> 'rev-parse' '--show-prefix'\n> >> 19:15:35.541332 git.c:348               trace: built-in: git\n> >> 'rev-parse' '--show-toplevel'\n> >> 19:15:35.598374 git.c:348               trace: built-in: git 'var'\n> >> 'GIT_COMMITTER_IDENT'\n> >> 19:15:35.659417 git.c:348               trace: built-in: git\n> >> 'rev-parse' '--verify' '-q' 'HEAD'\n> >> 19:15:35.724462 git.c:348               trace: built-in: git 'config'\n> >> '--bool' '--get' 'am.messageid'\n> >> 19:15:35.811524 git.c:348               trace: built-in: git 'config'\n> >> '--bool' '--get' 'am.keepcr'\n> >> 19:15:36.037685 git.c:348               trace: built-in: git\n> >> 'update-index' '-q' '--refresh'\n> >> 19:15:37.057409 git.c:557               trace: exec:\n> >> 'git-sh-i18n--envsubst' '--variables' 'Applying: $FIRSTLINE'\n> >> 19:15:37.057409 run-command.c:351       trace: run_command:\n> >> 'git-sh-i18n--envsubst' '--variables' 'Applying: $FIRSTLINE'\n> >> 19:15:37.178495 git.c:557               trace: exec:\n> >> 'git-sh-i18n--envsubst' 'Applying: $FIRSTLINE'\n> >> 19:15:37.178495 run-command.c:351       trace: run_command:\n> >> 'git-sh-i18n--envsubst' 'Applying: $FIRSTLINE'\n> >> Applying: TEMP: Update Core submodule\n> >> 19:15:37.360624 git.c:348               trace: built-in: git\n> >> 'diff-index' '--ignore-submodules' '--quiet' '--cached' 'HEAD' '--'\n> >> No changes - did you forget to use 'git add'?\n> >> If there is nothing left to stage, chances are that something else\n> >> already introduced the same changes; you might want to skip this patch.\n> >>\n> >> When you have resolved this problem, run \"git rebase --continue\".\n> >> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n> >> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n> >>\n> >> 19:15:37.456694 git.c:348               trace: built-in: git\n> >> 'rev-parse' '--verify' '-q' 'HEAD'\n> >\n> >\n> > For reference, I found an existing mailing list discussion on this\n> > from a few years ago:\n> > http://git.661346.n2.nabble.com/Interactive-rebase-with-submodules-td7197519.html\n> >\n> > Apparently a patch was proposed, i do not know if it made it in a\n> > release of Git. But based on what I'm seeing right now, it seems that\n> > it did not.\n> \n> Nope, this patch made it in at the a6754cda change John mentioned.\n> But while working on recursive submodule update I got the impression\n> that possibly some of the '--ignore-submodule' options used in the\n> git scripts should be changed to '--ignore-submodule=dirty', but I\n> didn't find the time yet to confirm that hypothesis (I'm currently\n> concentrating on those builtins that use unpack_trees() directly).\n\nI think the difference is that Robert isn't going through the\ninteractive codepath.  a6754cda affects git-rebase--interactive.sh which\nno longer contains --ignore-submodules at all, but git-rebase.sh does\nuse it at the beginning of the \"rebase --continue\" case.\n\nSo if you're continuing an interactive rebase you go:\n\n\tgit update-index --ignore-submodules --refresh &&\n\tgit diff-files --quiet --ignore-submodules || {\n\t\techo \"$(gettext \"You must edit all merge conflicts and then\nmark them as resolved using git add\")\"\n\t\texit 1\n\t}\n\t\nand then jump into git-rebase--interactive.sh which checks for any\ncached changes (including submodules) before deciding what to do.\n\nBut if the rebase isn't interactive it goes to git-am which results in\nthe message above.\n\nSo it seems a change similar to a6754cda is needed in git-am in order to\nfix this for non-interactive rebases (and presumably plain \"git am\n--continue\" if only submodule changes are staged).\n\nHowever, I can't figure out how the code results in the trace above.  On\nmaster (v2.4.0-rc2-43-gfb89636) the \"Applying: $FIRSTLINE\" comes from\nline 843 of git-am.sh so the diff-index invocation should be the one on\nline 863, which matches the message printed.  But that invocation\ndoesn't pass --ignore-submodules and AFAICT never has (at least in\nvanilla Git).\n"},{"id":"259918","messageId":"20150423224336.GD16113@serenity.lan","threadId":"39048","inReplyTo":"20150423203538.GC16113@serenity.lan","subject":"Re: Rebasing with submodule change causes red herring with --continue","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2015-04-23T22:43:36Z","receivedAt":"2015-04-23T22:43:36Z","isPatch":false,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"On Thu, Apr 23, 2015 at 09:35:38PM +0100, John Keeping wrote:\n> On Thu, Apr 23, 2015 at 09:43:44PM +0200, Jens Lehmann wrote:\n> > Am 23.04.2015 um 21:07 schrieb Robert Dailey:\n> > > On Thu, Apr 23, 2015 at 1:17 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:\n> > >> On Fri, Apr 10, 2015 at 11:44 AM, John Keeping <john@keeping.me.uk> wrote:\n> > >>> On Fri, Apr 10, 2015 at 11:30:20AM -0500, Robert Dailey wrote:\n> > >>>> I have a branch that contains a commit with a single change: A\n> > >>>> submodule pointing to a new SHA1.\n> > >>>>\n> > >>>> When I rebase this branch onto the tip of its parent branch AND that\n> > >>>> parent branch had modified that same submodule, the rebase stops at\n> > >>>> the commit on my branch that modified the submodule and asks me if I\n> > >>>> want to keep REMOTE or LOCAL. I say LOCAL and notice immediately that\n> > >>>> the submodule is not staged (normally it would be).\n> > >>>>\n> > >>>> I do:\n> > >>>>\n> > >>>> $ git add my-submodule\n> > >>>>\n> > >>>> Then I do:\n> > >>>>\n> > >>>> $ git rebase --continue\n> > >>>>\n> > >>>> At this point, it fails asking me if I forgot to stage changes and\n> > >>>> recommends doing --skip. This is normally what you would see if the\n> > >>>> staging area was completely empty, however it isn't, since I see the\n> > >>>> submodule is in there.\n> > >>>>\n> > >>>> Is this a bug or am I missing a fundamental here? I'm using Git 2.1.0\n> > >>>> on Windows through MSYS. I'll provide more concrete examples if my\n> > >>>> summary of the issue doesn't \"ring any bells\".\n> > >>>\n> > >>> I hit something similar in the past, but it was fixed with commit\n> > >>> a6754cd (rebase -i continue: don't skip commits that only change\n> > >>> submodules, 2012-04-07) so I think you must be hitting a slightly\n> > >>> different problem, although the tests added in that commit look like\n> > >>> they do test the scenario you describe (specifically 'rebase -i continue\n> > >>> with only submodule staged').\n> > >>\n> > >> I am still running into this issue on git 2.3.5 on Windows. Logs\n> > >> below. One interesting thing to note in the git trace output is that\n> > >> it is specifying --ignore-submodules option to `git diff-files` during\n> > >> the rebase continue. Is this due to a configuration option? It seems\n> > >> like git should not be ignoring submodules when continuing a rebase\n> > >> (this should only affect direct calls to diff)\n> > >>\n> > >>\n> > >> |-- Robert@M5536:/e/code/frontend (timeline-ids-develop|REBASE 3/3) --|\n> > >> $ git status\n> > >> rebase in progress; onto bb05e7c\n> > >> You are currently rebasing branch 'timeline-ids-develop' on 'bb05e7c'.\n> > >>    (all conflicts fixed: run \"git rebase --continue\")\n> > >>\n> > >> Changes to be committed:\n> > >>    (use \"git reset HEAD <file>...\" to unstage)\n> > >>\n> > >>          modified:   Core\n> > >>\n> > >> Changes not staged for commit:\n> > >>    (use \"git add <file>...\" to update what will be committed)\n> > >>    (use \"git checkout -- <file>...\" to discard changes in working directory)\n> > >>\n> > >>          modified:   Core (new commits)\n> > >>\n> > >> Untracked files:\n> > >>    (use \"git add <file>...\" to include in what will be committed)\n> > >>\n> > >>          Tools/FontTool/\n> > >>\n> > >>\n> > >> |-- Robert@M5536:/e/code/frontend (timeline-ids-develop|REBASE 3/3) --|\n> > >> $ GIT_TRACE=1 git rebase --continue\n> > >> 19:15:33.569945 git.c:557               trace: exec: 'git-rebase' '--continue'\n> > >> 19:15:33.569945 run-command.c:351       trace: run_command:\n> > >> 'git-rebase' '--continue'\n> > >> 19:15:33.775097 git.c:348               trace: built-in: git\n> > >> 'rev-parse' '--parseopt' '--stuck-long' '--' '--continue'\n> > >> 19:15:33.931190 git.c:348               trace: built-in: git\n> > >> 'rev-parse' '--git-dir'\n> > >> 19:15:34.007242 git.c:348               trace: built-in: git\n> > >> 'rev-parse' '--is-bare-repository'\n> > >> 19:15:34.059280 git.c:348               trace: built-in: git\n> > >> 'rev-parse' '--show-toplevel'\n> > >> 19:15:34.148343 git.c:348               trace: built-in: git 'config'\n> > >> '--bool' 'rebase.stat'\n> > >> 19:15:34.227399 git.c:348               trace: built-in: git 'config'\n> > >> '--bool' 'rebase.autostash'\n> > >> 19:15:34.280437 git.c:348               trace: built-in: git 'config'\n> > >> '--bool' 'rebase.autosquash'\n> > >> 19:15:34.335476 git.c:348               trace: built-in: git\n> > >> 'rev-parse' '--verify' 'HEAD'\n> > >> 19:15:34.389515 git.c:348               trace: built-in: git\n> > >> 'update-index' '--ignore-submodules' '--refresh'\n> > >> 19:15:34.554631 git.c:348               trace: built-in: git\n> > >> 'diff-files' '--quiet' '--ignore-submodules'\n> > >> 19:15:34.902879 git.c:557               trace: exec: 'git-am'\n> > >> '--resolved' '--resolvemsg=\n> > >> When you have resolved this problem, run \"git rebase --continue\".\n> > >> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n> > >> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n> > >> '\n> > >> 19:15:34.902879 run-command.c:351       trace: run_command: 'git-am'\n> > >> '--resolved' '--resolvemsg=\n> > >> When you have resolved this problem, run \"git rebase --continue\".\n> > >> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n> > >> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n> > >> '\n> > >> 19:15:35.113028 git.c:348               trace: built-in: git\n> > >> 'rev-parse' '--parseopt' '--stuck-long' '--' '--resolved'\n> > >> '--resolvemsg=\n> > >> When you have resolved this problem, run \"git rebase --continue\".\n> > >> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n> > >> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n> > >> '\n> > >> 19:15:35.290155 git.c:348               trace: built-in: git\n> > >> 'rev-parse' '--git-dir'\n> > >> 19:15:35.387224 git.c:348               trace: built-in: git\n> > >> 'rev-parse' '--show-prefix'\n> > >> 19:15:35.541332 git.c:348               trace: built-in: git\n> > >> 'rev-parse' '--show-toplevel'\n> > >> 19:15:35.598374 git.c:348               trace: built-in: git 'var'\n> > >> 'GIT_COMMITTER_IDENT'\n> > >> 19:15:35.659417 git.c:348               trace: built-in: git\n> > >> 'rev-parse' '--verify' '-q' 'HEAD'\n> > >> 19:15:35.724462 git.c:348               trace: built-in: git 'config'\n> > >> '--bool' '--get' 'am.messageid'\n> > >> 19:15:35.811524 git.c:348               trace: built-in: git 'config'\n> > >> '--bool' '--get' 'am.keepcr'\n> > >> 19:15:36.037685 git.c:348               trace: built-in: git\n> > >> 'update-index' '-q' '--refresh'\n> > >> 19:15:37.057409 git.c:557               trace: exec:\n> > >> 'git-sh-i18n--envsubst' '--variables' 'Applying: $FIRSTLINE'\n> > >> 19:15:37.057409 run-command.c:351       trace: run_command:\n> > >> 'git-sh-i18n--envsubst' '--variables' 'Applying: $FIRSTLINE'\n> > >> 19:15:37.178495 git.c:557               trace: exec:\n> > >> 'git-sh-i18n--envsubst' 'Applying: $FIRSTLINE'\n> > >> 19:15:37.178495 run-command.c:351       trace: run_command:\n> > >> 'git-sh-i18n--envsubst' 'Applying: $FIRSTLINE'\n> > >> Applying: TEMP: Update Core submodule\n> > >> 19:15:37.360624 git.c:348               trace: built-in: git\n> > >> 'diff-index' '--ignore-submodules' '--quiet' '--cached' 'HEAD' '--'\n> > >> No changes - did you forget to use 'git add'?\n> > >> If there is nothing left to stage, chances are that something else\n> > >> already introduced the same changes; you might want to skip this patch.\n> > >>\n> > >> When you have resolved this problem, run \"git rebase --continue\".\n> > >> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n> > >> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n> > >>\n> > >> 19:15:37.456694 git.c:348               trace: built-in: git\n> > >> 'rev-parse' '--verify' '-q' 'HEAD'\n> > >\n> > >\n> > > For reference, I found an existing mailing list discussion on this\n> > > from a few years ago:\n> > > http://git.661346.n2.nabble.com/Interactive-rebase-with-submodules-td7197519.html\n> > >\n> > > Apparently a patch was proposed, i do not know if it made it in a\n> > > release of Git. But based on what I'm seeing right now, it seems that\n> > > it did not.\n> > \n> > Nope, this patch made it in at the a6754cda change John mentioned.\n> > But while working on recursive submodule update I got the impression\n> > that possibly some of the '--ignore-submodule' options used in the\n> > git scripts should be changed to '--ignore-submodule=dirty', but I\n> > didn't find the time yet to confirm that hypothesis (I'm currently\n> > concentrating on those builtins that use unpack_trees() directly).\n> \n> I think the difference is that Robert isn't going through the\n> interactive codepath.  a6754cda affects git-rebase--interactive.sh which\n> no longer contains --ignore-submodules at all, but git-rebase.sh does\n> use it at the beginning of the \"rebase --continue\" case.\n> \n> So if you're continuing an interactive rebase you go:\n> \n> \tgit update-index --ignore-submodules --refresh &&\n> \tgit diff-files --quiet --ignore-submodules || {\n> \t\techo \"$(gettext \"You must edit all merge conflicts and then\n> mark them as resolved using git add\")\"\n> \t\texit 1\n> \t}\n> \t\n> and then jump into git-rebase--interactive.sh which checks for any\n> cached changes (including submodules) before deciding what to do.\n> \n> But if the rebase isn't interactive it goes to git-am which results in\n> the message above.\n> \n> So it seems a change similar to a6754cda is needed in git-am in order to\n> fix this for non-interactive rebases (and presumably plain \"git am\n> --continue\" if only submodule changes are staged).\n> \n> However, I can't figure out how the code results in the trace above.  On\n> master (v2.4.0-rc2-43-gfb89636) the \"Applying: $FIRSTLINE\" comes from\n> line 843 of git-am.sh so the diff-index invocation should be the one on\n> line 863, which matches the message printed.  But that invocation\n> doesn't pass --ignore-submodules and AFAICT never has (at least in\n> vanilla Git).\n\nIt looks like this comes from a change in msysgit/git [0] that isn't in\nupstream git.git.\n\n[0] https://github.com/msysgit/git/commit/fbe1f041f9890f4b2eea3ed2265f82c9b845a39b\n"},{"id":"260085","messageId":"CAHd499CLtHRSJjxJKCTN_tMhNDGC=OORHgocz=Zz6yKnr1Utzw@mail.gmail.com","threadId":"39048","inReplyTo":"20150423224336.GD16113@serenity.lan","subject":"Re: Rebasing with submodule change causes red herring with --continue","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2015-04-27T21:09:11Z","receivedAt":"2015-04-27T21:09:11Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"On Thu, Apr 23, 2015 at 5:43 PM, John Keeping <john@keeping.me.uk> wrote:\n> On Thu, Apr 23, 2015 at 09:35:38PM +0100, John Keeping wrote:\n>> On Thu, Apr 23, 2015 at 09:43:44PM +0200, Jens Lehmann wrote:\n>> > Am 23.04.2015 um 21:07 schrieb Robert Dailey:\n>> > > On Thu, Apr 23, 2015 at 1:17 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:\n>> > >> On Fri, Apr 10, 2015 at 11:44 AM, John Keeping <john@keeping.me.uk> wrote:\n>> > >>> On Fri, Apr 10, 2015 at 11:30:20AM -0500, Robert Dailey wrote:\n>> > >>>> I have a branch that contains a commit with a single change: A\n>> > >>>> submodule pointing to a new SHA1.\n>> > >>>>\n>> > >>>> When I rebase this branch onto the tip of its parent branch AND that\n>> > >>>> parent branch had modified that same submodule, the rebase stops at\n>> > >>>> the commit on my branch that modified the submodule and asks me if I\n>> > >>>> want to keep REMOTE or LOCAL. I say LOCAL and notice immediately that\n>> > >>>> the submodule is not staged (normally it would be).\n>> > >>>>\n>> > >>>> I do:\n>> > >>>>\n>> > >>>> $ git add my-submodule\n>> > >>>>\n>> > >>>> Then I do:\n>> > >>>>\n>> > >>>> $ git rebase --continue\n>> > >>>>\n>> > >>>> At this point, it fails asking me if I forgot to stage changes and\n>> > >>>> recommends doing --skip. This is normally what you would see if the\n>> > >>>> staging area was completely empty, however it isn't, since I see the\n>> > >>>> submodule is in there.\n>> > >>>>\n>> > >>>> Is this a bug or am I missing a fundamental here? I'm using Git 2.1.0\n>> > >>>> on Windows through MSYS. I'll provide more concrete examples if my\n>> > >>>> summary of the issue doesn't \"ring any bells\".\n>> > >>>\n>> > >>> I hit something similar in the past, but it was fixed with commit\n>> > >>> a6754cd (rebase -i continue: don't skip commits that only change\n>> > >>> submodules, 2012-04-07) so I think you must be hitting a slightly\n>> > >>> different problem, although the tests added in that commit look like\n>> > >>> they do test the scenario you describe (specifically 'rebase -i continue\n>> > >>> with only submodule staged').\n>> > >>\n>> > >> I am still running into this issue on git 2.3.5 on Windows. Logs\n>> > >> below. One interesting thing to note in the git trace output is that\n>> > >> it is specifying --ignore-submodules option to `git diff-files` during\n>> > >> the rebase continue. Is this due to a configuration option? It seems\n>> > >> like git should not be ignoring submodules when continuing a rebase\n>> > >> (this should only affect direct calls to diff)\n>> > >>\n>> > >>\n>> > >> |-- Robert@M5536:/e/code/frontend (timeline-ids-develop|REBASE 3/3) --|\n>> > >> $ git status\n>> > >> rebase in progress; onto bb05e7c\n>> > >> You are currently rebasing branch 'timeline-ids-develop' on 'bb05e7c'.\n>> > >>    (all conflicts fixed: run \"git rebase --continue\")\n>> > >>\n>> > >> Changes to be committed:\n>> > >>    (use \"git reset HEAD <file>...\" to unstage)\n>> > >>\n>> > >>          modified:   Core\n>> > >>\n>> > >> Changes not staged for commit:\n>> > >>    (use \"git add <file>...\" to update what will be committed)\n>> > >>    (use \"git checkout -- <file>...\" to discard changes in working directory)\n>> > >>\n>> > >>          modified:   Core (new commits)\n>> > >>\n>> > >> Untracked files:\n>> > >>    (use \"git add <file>...\" to include in what will be committed)\n>> > >>\n>> > >>          Tools/FontTool/\n>> > >>\n>> > >>\n>> > >> |-- Robert@M5536:/e/code/frontend (timeline-ids-develop|REBASE 3/3) --|\n>> > >> $ GIT_TRACE=1 git rebase --continue\n>> > >> 19:15:33.569945 git.c:557               trace: exec: 'git-rebase' '--continue'\n>> > >> 19:15:33.569945 run-command.c:351       trace: run_command:\n>> > >> 'git-rebase' '--continue'\n>> > >> 19:15:33.775097 git.c:348               trace: built-in: git\n>> > >> 'rev-parse' '--parseopt' '--stuck-long' '--' '--continue'\n>> > >> 19:15:33.931190 git.c:348               trace: built-in: git\n>> > >> 'rev-parse' '--git-dir'\n>> > >> 19:15:34.007242 git.c:348               trace: built-in: git\n>> > >> 'rev-parse' '--is-bare-repository'\n>> > >> 19:15:34.059280 git.c:348               trace: built-in: git\n>> > >> 'rev-parse' '--show-toplevel'\n>> > >> 19:15:34.148343 git.c:348               trace: built-in: git 'config'\n>> > >> '--bool' 'rebase.stat'\n>> > >> 19:15:34.227399 git.c:348               trace: built-in: git 'config'\n>> > >> '--bool' 'rebase.autostash'\n>> > >> 19:15:34.280437 git.c:348               trace: built-in: git 'config'\n>> > >> '--bool' 'rebase.autosquash'\n>> > >> 19:15:34.335476 git.c:348               trace: built-in: git\n>> > >> 'rev-parse' '--verify' 'HEAD'\n>> > >> 19:15:34.389515 git.c:348               trace: built-in: git\n>> > >> 'update-index' '--ignore-submodules' '--refresh'\n>> > >> 19:15:34.554631 git.c:348               trace: built-in: git\n>> > >> 'diff-files' '--quiet' '--ignore-submodules'\n>> > >> 19:15:34.902879 git.c:557               trace: exec: 'git-am'\n>> > >> '--resolved' '--resolvemsg=\n>> > >> When you have resolved this problem, run \"git rebase --continue\".\n>> > >> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n>> > >> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n>> > >> '\n>> > >> 19:15:34.902879 run-command.c:351       trace: run_command: 'git-am'\n>> > >> '--resolved' '--resolvemsg=\n>> > >> When you have resolved this problem, run \"git rebase --continue\".\n>> > >> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n>> > >> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n>> > >> '\n>> > >> 19:15:35.113028 git.c:348               trace: built-in: git\n>> > >> 'rev-parse' '--parseopt' '--stuck-long' '--' '--resolved'\n>> > >> '--resolvemsg=\n>> > >> When you have resolved this problem, run \"git rebase --continue\".\n>> > >> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n>> > >> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n>> > >> '\n>> > >> 19:15:35.290155 git.c:348               trace: built-in: git\n>> > >> 'rev-parse' '--git-dir'\n>> > >> 19:15:35.387224 git.c:348               trace: built-in: git\n>> > >> 'rev-parse' '--show-prefix'\n>> > >> 19:15:35.541332 git.c:348               trace: built-in: git\n>> > >> 'rev-parse' '--show-toplevel'\n>> > >> 19:15:35.598374 git.c:348               trace: built-in: git 'var'\n>> > >> 'GIT_COMMITTER_IDENT'\n>> > >> 19:15:35.659417 git.c:348               trace: built-in: git\n>> > >> 'rev-parse' '--verify' '-q' 'HEAD'\n>> > >> 19:15:35.724462 git.c:348               trace: built-in: git 'config'\n>> > >> '--bool' '--get' 'am.messageid'\n>> > >> 19:15:35.811524 git.c:348               trace: built-in: git 'config'\n>> > >> '--bool' '--get' 'am.keepcr'\n>> > >> 19:15:36.037685 git.c:348               trace: built-in: git\n>> > >> 'update-index' '-q' '--refresh'\n>> > >> 19:15:37.057409 git.c:557               trace: exec:\n>> > >> 'git-sh-i18n--envsubst' '--variables' 'Applying: $FIRSTLINE'\n>> > >> 19:15:37.057409 run-command.c:351       trace: run_command:\n>> > >> 'git-sh-i18n--envsubst' '--variables' 'Applying: $FIRSTLINE'\n>> > >> 19:15:37.178495 git.c:557               trace: exec:\n>> > >> 'git-sh-i18n--envsubst' 'Applying: $FIRSTLINE'\n>> > >> 19:15:37.178495 run-command.c:351       trace: run_command:\n>> > >> 'git-sh-i18n--envsubst' 'Applying: $FIRSTLINE'\n>> > >> Applying: TEMP: Update Core submodule\n>> > >> 19:15:37.360624 git.c:348               trace: built-in: git\n>> > >> 'diff-index' '--ignore-submodules' '--quiet' '--cached' 'HEAD' '--'\n>> > >> No changes - did you forget to use 'git add'?\n>> > >> If there is nothing left to stage, chances are that something else\n>> > >> already introduced the same changes; you might want to skip this patch.\n>> > >>\n>> > >> When you have resolved this problem, run \"git rebase --continue\".\n>> > >> If you prefer to skip this patch, run \"git rebase --skip\" instead.\n>> > >> To check out the original branch and stop rebasing, run \"git rebase --abort\".\n>> > >>\n>> > >> 19:15:37.456694 git.c:348               trace: built-in: git\n>> > >> 'rev-parse' '--verify' '-q' 'HEAD'\n>> > >\n>> > >\n>> > > For reference, I found an existing mailing list discussion on this\n>> > > from a few years ago:\n>> > > http://git.661346.n2.nabble.com/Interactive-rebase-with-submodules-td7197519.html\n>> > >\n>> > > Apparently a patch was proposed, i do not know if it made it in a\n>> > > release of Git. But based on what I'm seeing right now, it seems that\n>> > > it did not.\n>> >\n>> > Nope, this patch made it in at the a6754cda change John mentioned.\n>> > But while working on recursive submodule update I got the impression\n>> > that possibly some of the '--ignore-submodule' options used in the\n>> > git scripts should be changed to '--ignore-submodule=dirty', but I\n>> > didn't find the time yet to confirm that hypothesis (I'm currently\n>> > concentrating on those builtins that use unpack_trees() directly).\n>>\n>> I think the difference is that Robert isn't going through the\n>> interactive codepath.  a6754cda affects git-rebase--interactive.sh which\n>> no longer contains --ignore-submodules at all, but git-rebase.sh does\n>> use it at the beginning of the \"rebase --continue\" case.\n>>\n>> So if you're continuing an interactive rebase you go:\n>>\n>>       git update-index --ignore-submodules --refresh &&\n>>       git diff-files --quiet --ignore-submodules || {\n>>               echo \"$(gettext \"You must edit all merge conflicts and then\n>> mark them as resolved using git add\")\"\n>>               exit 1\n>>       }\n>>\n>> and then jump into git-rebase--interactive.sh which checks for any\n>> cached changes (including submodules) before deciding what to do.\n>>\n>> But if the rebase isn't interactive it goes to git-am which results in\n>> the message above.\n>>\n>> So it seems a change similar to a6754cda is needed in git-am in order to\n>> fix this for non-interactive rebases (and presumably plain \"git am\n>> --continue\" if only submodule changes are staged).\n>>\n>> However, I can't figure out how the code results in the trace above.  On\n>> master (v2.4.0-rc2-43-gfb89636) the \"Applying: $FIRSTLINE\" comes from\n>> line 843 of git-am.sh so the diff-index invocation should be the one on\n>> line 863, which matches the message printed.  But that invocation\n>> doesn't pass --ignore-submodules and AFAICT never has (at least in\n>> vanilla Git).\n>\n> It looks like this comes from a change in msysgit/git [0] that isn't in\n> upstream git.git.\n>\n> [0] https://github.com/msysgit/git/commit/fbe1f041f9890f4b2eea3ed2265f82c9b845a39b\n\nThanks guys; I worked with the developers on the Git for Windows\nproject and they have reverted that commit.\n"}]}