{"thread":{"id":"50538","subject":"git rebase --continue after solving conflicts doesn't work anymore","startedAt":"2019-02-19T04:18:13Z","lastAt":"2019-02-19T14:32:34Z","messageCount":9,"participants":["Sebastián Mancilla","Christian Couder","Eric Sunshine","Phillip Wood","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"369611","messageId":"CAJPSwc1GuifK9BdssWQsf+oVY0Aw+PLM1pgAiis7UdV1tZrpew@mail.gmail.com","threadId":"50538","inReplyTo":null,"subject":"git rebase --continue after solving conflicts doesn't work anymore","fromName":"Sebastián Mancilla","fromEmail":"smancill.m@gmail.com","sentAt":"2019-02-19T04:17:59Z","receivedAt":"2019-02-19T04:18:13Z","isPatch":false,"sender":{"key":"smancill.m@gmail.com","avatar":null},"body":"I've always used \"git rebase --continue\" as the help shows:\n\n    Resolve all conflicts manually, mark them as resolved with\n    \"git add/rm <conflicted_files>\", then run \"git rebase --continue\".\n\nand Git would apply the conflicted commit without issues and the rebase would\ncontinue.\n\nBut since Git 2.20.x it doesn't work anymore. Now after solving the conflicts\nand running \"git rebase --continue\" I get this error most of the time:\n\n    error: unable to dequote value of 'GIT_AUTHOR_DATE'\n    error: you have staged changes in your working tree\n    If these changes are meant to be squashed into the previous commit, run:\n\n      git commit --amend\n\n    If they are meant to go into a new commit, run:\n\n      git commit\n\n    In both cases, once you're done, continue with:\n\n      git rebase --continue\n\n    error: could not commit staged changes.\n\nNow I have to run \"git commit\" first to commit manually and then do the \"git\nrebase --continue\".\n\nI've compiled 2.18.2 and 2.19.2 to check and the error doesn't happen.\n\nIt is present in 2.20.x and current master v2.21.0-rc1-9-gca1b411648.\n\n\nIs it a regression because of the new rebase written in C?\n\n\n-- \nSebastian Mancilla\n"},{"id":"369613","messageId":"CAP8UFD22QMJyiJmQO1YVFmBkZuzex58+QBbTbdCCVHa8OGCQJA@mail.gmail.com","threadId":"50538","inReplyTo":"CAJPSwc1GuifK9BdssWQsf+oVY0Aw+PLM1pgAiis7UdV1tZrpew@mail.gmail.com","subject":"Re: git rebase --continue after solving conflicts doesn't work anymore","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2019-02-19T06:45:21Z","receivedAt":"2019-02-19T06:45:36Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Tue, Feb 19, 2019 at 5:20 AM Sebastián Mancilla <smancill.m@gmail.com> wrote:\n>\n> I've always used \"git rebase --continue\" as the help shows:\n>\n>     Resolve all conflicts manually, mark them as resolved with\n>     \"git add/rm <conflicted_files>\", then run \"git rebase --continue\".\n>\n> and Git would apply the conflicted commit without issues and the rebase would\n> continue.\n>\n> But since Git 2.20.x it doesn't work anymore. Now after solving the conflicts\n> and running \"git rebase --continue\" I get this error most of the time:\n>\n>     error: unable to dequote value of 'GIT_AUTHOR_DATE'\n\nIt looks like this can happen only when an \"author-script\" file (most\nlikely .git/rebase-merge/author-script) is read by the sequencer\nmechanism. Could you show us the content of this file on your machine?\nIt could also help if you could give us information about your OS and\nlocale.\n\n>     error: you have staged changes in your working tree\n>     If these changes are meant to be squashed into the previous commit, run:\n>\n>       git commit --amend\n>\n>     If they are meant to go into a new commit, run:\n>\n>       git commit\n>\n>     In both cases, once you're done, continue with:\n>\n>       git rebase --continue\n>\n>     error: could not commit staged changes.\n>\n> Now I have to run \"git commit\" first to commit manually and then do the \"git\n> rebase --continue\".\n>\n> I've compiled 2.18.2 and 2.19.2 to check and the error doesn't happen.\n>\n> It is present in 2.20.x and current master v2.21.0-rc1-9-gca1b411648.\n>\n>\n> Is it a regression because of the new rebase written in C?\n\nThat's possible.\n\nThanks for the report,\nChristian.\n"},{"id":"369615","messageId":"CAPig+cQHx_BuxwZS7+juBdgKyAWhStU=9kFhs2hf=wjOMGAd7Q@mail.gmail.com","threadId":"50538","inReplyTo":"CAP8UFD22QMJyiJmQO1YVFmBkZuzex58+QBbTbdCCVHa8OGCQJA@mail.gmail.com","subject":"Re: git rebase --continue after solving conflicts doesn't work anymore","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2019-02-19T07:22:22Z","receivedAt":"2019-02-19T07:22:36Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"[cc:+phillip.wood@talktalk.net]\n\nOn Tue, Feb 19, 2019 at 1:45 AM Christian Couder\n<christian.couder@gmail.com> wrote:\n> On Tue, Feb 19, 2019 at 5:20 AM Sebastián Mancilla <smancill.m@gmail.com> wrote:\n> > But since Git 2.20.x it doesn't work anymore. Now after solving the conflicts\n> > and running \"git rebase --continue\" I get this error most of the time:\n> >\n> >     error: unable to dequote value of 'GIT_AUTHOR_DATE'\n>\n> It looks like this can happen only when an \"author-script\" file (most\n> likely .git/rebase-merge/author-script) is read by the sequencer\n> mechanism. Could you show us the content of this file on your machine?\n\nA very good suggestion considering that there have been changes\nrecently specifically related to the parsing of GIT_AUTHOR_DATE in C\ncode.\n"},{"id":"369622","messageId":"317468c6-40cc-9f26-8ee3-3392c3908efb@talktalk.net","threadId":"50538","inReplyTo":"CAPig+cQHx_BuxwZS7+juBdgKyAWhStU=9kFhs2hf=wjOMGAd7Q@mail.gmail.com","subject":"Re: git rebase --continue after solving conflicts doesn't work anymore","fromName":"Phillip Wood","fromEmail":"phillip.wood@talktalk.net","sentAt":"2019-02-19T09:59:24Z","receivedAt":"2019-02-19T09:59:30Z","isPatch":false,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"Dear Sebastián\n\nOn 19/02/2019 07:22, Eric Sunshine wrote:\n> [cc:+phillip.wood@talktalk.net]\n\nThanks Eric\n\n> On Tue, Feb 19, 2019 at 1:45 AM Christian Couder\n> <christian.couder@gmail.com> wrote:\n>> On Tue, Feb 19, 2019 at 5:20 AM Sebastián Mancilla <smancill.m@gmail.com> wrote:\n>>> But since Git 2.20.x it doesn't work anymore. Now after solving the conflicts\n>>> and running \"git rebase --continue\" I get this error most of the time:\n>>>\n>>>      error: unable to dequote value of 'GIT_AUTHOR_DATE'\n>>\n>> It looks like this can happen only when an \"author-script\" file (most\n>> likely .git/rebase-merge/author-script)\n\nor it could be .git/rebase-apply/author-script depending on the options \npassed to rebase when it started (the sequencer and am use the same code \nfor reading the author script now)\n\n>> is read by the sequencer\n>> mechanism. Could you show us the content of this file on your machine?\n> \n> A very good suggestion considering that there have been changes\n> recently specifically related to the parsing of GIT_AUTHOR_DATE in C\n> code.\n\nThat would be very helpful, without seeing that it's hard to know what \nthe problem is.\n\nBest Wishes\n\nPhillip\n\n"},{"id":"369637","messageId":"CAJPSwc0Xu=HoF5XrqnFj_1ZrshM3HFb78tJkXOTWZ=HJX8Akgg@mail.gmail.com","threadId":"50538","inReplyTo":"317468c6-40cc-9f26-8ee3-3392c3908efb@talktalk.net","subject":"Re: git rebase --continue after solving conflicts doesn't work anymore","fromName":"Sebastián Mancilla","fromEmail":"smancill.m@gmail.com","sentAt":"2019-02-19T14:03:22Z","receivedAt":"2019-02-19T14:03:35Z","isPatch":false,"sender":{"key":"smancill.m@gmail.com","avatar":null},"body":"My system is macOS Mojave 10.14.2. I normally use Git from Homebrew (currently\nGit 2.20.1).\n\nI investigated this further, and I think I found the problem on my end.\n\nWhen I actually run \"git rebase --interactive <commit>\" from the terminal,\neverything works fine.\n\nBut almost every time I start my rebases from inside \"tig\" [0], for which I\nhave this mapping:\n\n        bind main R <git rebase -i %(commit)\n\ntig will exit after running that command, and then I normally continue working\non the rebase from the shell. And it is when I start the rebase this way that\n\"git rebase --continue\" fails after solving conflicts.\n\nSecond, I have tig installed with the Nix package manager [1], which shows\n\n        $ ~/.nix-profile/bin/tig --version\n        tig version 2.4.1\n        ncursesw version 6.1.20180127\n        readline version 6.3\n\nSo, I decided to try with tig from Homebrew, and then the problem\ndoesn't happen.\nThe Hombrew version of tig shows:\n\n        $ /usr/local/bin/tig --version\n        tig version 2.4.1\n        ncurses version 5.7.20081102\n        readline version 8.0\n\nI will keep using tig from Homebrew to avoid issues for now.\n\n\nIn summary, the problem only happens when I start the rebase from inside tig,\nbut only when tig is the version from the Nix package manager, which has\ndifferent dependencies than the Homebrew version of tig.\nAnd it happens for Git 2.20.x and master. Git <= 2.19.x works fine.\n\n\nI also did bisect Git (I never though I would be bisecting Git itself).\nIt landed in this commit: 4d010a757c (sequencer: use read_author_script(),\n2018-10-31).\n\nAnd the content of .git/rebase-merge/author-script is always the same:\n\n        GIT_AUTHOR_NAME='Sebastián Mancilla'\n        GIT_AUTHOR_EMAIL='smancill@jlab.org'\n        GIT_AUTHOR_DATE='@1550530007 -0300\n\n\nRegards\n\n\n[0]: https://github.com/jonas/tig\n[1]: https://nixos.org/nix/\n\nEl mar., 19 de feb. de 2019 a la(s) 06:59, Phillip Wood\n(phillip.wood@talktalk.net) escribió:\n>\n> Dear Sebastián\n>\n> On 19/02/2019 07:22, Eric Sunshine wrote:\n> > [cc:+phillip.wood@talktalk.net]\n>\n> Thanks Eric\n>\n> > On Tue, Feb 19, 2019 at 1:45 AM Christian Couder\n> > <christian.couder@gmail.com> wrote:\n> >> On Tue, Feb 19, 2019 at 5:20 AM Sebastián Mancilla <smancill.m@gmail.com> wrote:\n> >>> But since Git 2.20.x it doesn't work anymore. Now after solving the conflicts\n> >>> and running \"git rebase --continue\" I get this error most of the time:\n> >>>\n> >>>      error: unable to dequote value of 'GIT_AUTHOR_DATE'\n> >>\n> >> It looks like this can happen only when an \"author-script\" file (most\n> >> likely .git/rebase-merge/author-script)\n>\n> or it could be .git/rebase-apply/author-script depending on the options\n> passed to rebase when it started (the sequencer and am use the same code\n> for reading the author script now)\n>\n> >> is read by the sequencer\n> >> mechanism. Could you show us the content of this file on your machine?\n> >\n> > A very good suggestion considering that there have been changes\n> > recently specifically related to the parsing of GIT_AUTHOR_DATE in C\n> > code.\n>\n> That would be very helpful, without seeing that it's hard to know what\n> the problem is.\n>\n> Best Wishes\n>\n> Phillip\n>\n\n\n-- \nSebastian Mancilla\n"},{"id":"369640","messageId":"CACsJy8Crn3mnXkwj_CQ1capeAXT=Jvn5S-HdnKsTLJZvdH=ObQ@mail.gmail.com","threadId":"50538","inReplyTo":"CAJPSwc0Xu=HoF5XrqnFj_1ZrshM3HFb78tJkXOTWZ=HJX8Akgg@mail.gmail.com","subject":"Re: git rebase --continue after solving conflicts doesn't work anymore","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2019-02-19T14:14:46Z","receivedAt":"2019-02-19T14:15:15Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Tue, Feb 19, 2019 at 9:04 PM Sebastián Mancilla <smancill.m@gmail.com> wrote:\n> And the content of .git/rebase-merge/author-script is always the same:\n>\n>         GIT_AUTHOR_NAME='Sebastián Mancilla'\n>         GIT_AUTHOR_EMAIL='smancill@jlab.org'\n>         GIT_AUTHOR_DATE='@1550530007 -0300\n>\n\nJust to be clear, the lack of closing quote on the last line is not a\ntypo right?\n-- \nDuy\n"},{"id":"369641","messageId":"CAP8UFD2a6D1W_X0T3O8FTinBwVC1qoBk+jx84B-dQzRrieu_Xw@mail.gmail.com","threadId":"50538","inReplyTo":"CAJPSwc0Xu=HoF5XrqnFj_1ZrshM3HFb78tJkXOTWZ=HJX8Akgg@mail.gmail.com","subject":"Re: git rebase --continue after solving conflicts doesn't work anymore","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2019-02-19T14:18:53Z","receivedAt":"2019-02-19T14:19:08Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Tue, Feb 19, 2019 at 3:03 PM Sebastián Mancilla <smancill.m@gmail.com> wrote:\n>\n> My system is macOS Mojave 10.14.2. I normally use Git from Homebrew (currently\n> Git 2.20.1).\n>\n> I investigated this further, and I think I found the problem on my end.\n\n[...]\n\n> I also did bisect Git (I never though I would be bisecting Git itself).\n> It landed in this commit: 4d010a757c (sequencer: use read_author_script(),\n> 2018-10-31).\n\nThanks for investigating this.\n\n> And the content of .git/rebase-merge/author-script is always the same:\n>\n>         GIT_AUTHOR_NAME='Sebastián Mancilla'\n>         GIT_AUTHOR_EMAIL='smancill@jlab.org'\n>         GIT_AUTHOR_DATE='@1550530007 -0300\n\nWhen I look at such a file I get the following:\n\nGIT_AUTHOR_DATE='@1549569954 -0800'\n\nso it seems to me that a single quote is missing at the end of the\nline in your file, which might explain the error.\n\nNot sure which software is writing this file, but from what you\ndescribed it might be the tig you had previously installed.\n"},{"id":"369642","messageId":"CAJPSwc3-=ByzxTQirg9==6G4tUcR+0Bzc0cfknOWNCmb6e8hCw@mail.gmail.com","threadId":"50538","inReplyTo":"CACsJy8Crn3mnXkwj_CQ1capeAXT=Jvn5S-HdnKsTLJZvdH=ObQ@mail.gmail.com","subject":"Re: git rebase --continue after solving conflicts doesn't work anymore","fromName":"Sebastián Mancilla","fromEmail":"smancill.m@gmail.com","sentAt":"2019-02-19T14:25:15Z","receivedAt":"2019-02-19T14:25:29Z","isPatch":false,"sender":{"key":"smancill.m@gmail.com","avatar":null},"body":"No, it's not a typo. I just checked again.\n\nThat's the file that results when I start the rebase from tig (the Nix\nversion), which results in the error for rebase --continue.\n\nWhen I start the rebase manually or from tig (the Homebrew version)\nit has the quote.\n\n        GIT_AUTHOR_NAME='Sebastián Mancilla'\n        GIT_AUTHOR_EMAIL='smancill@jlab.org'\n        GIT_AUTHOR_DATE='@1550530007 -0300'\n\n\nRegards\n\nEl mar., 19 de feb. de 2019 a la(s) 11:15, Duy Nguyen\n(pclouds@gmail.com) escribió:\n>\n> On Tue, Feb 19, 2019 at 9:04 PM Sebastián Mancilla <smancill.m@gmail.com> wrote:\n> > And the content of .git/rebase-merge/author-script is always the same:\n> >\n> >         GIT_AUTHOR_NAME='Sebastián Mancilla'\n> >         GIT_AUTHOR_EMAIL='smancill@jlab.org'\n> >         GIT_AUTHOR_DATE='@1550530007 -0300\n> >\n>\n> Just to be clear, the lack of closing quote on the last line is not a\n> typo right?\n> --\n> Duy\n\n\n\n-- \nSebastian Mancilla\n"},{"id":"369644","messageId":"d7acf780-522d-84e6-68b8-d8d35a305588@talktalk.net","threadId":"50538","inReplyTo":"CAJPSwc0Xu=HoF5XrqnFj_1ZrshM3HFb78tJkXOTWZ=HJX8Akgg@mail.gmail.com","subject":"Re: git rebase --continue after solving conflicts doesn't work anymore","fromName":"Phillip Wood","fromEmail":"phillip.wood@talktalk.net","sentAt":"2019-02-19T14:32:27Z","receivedAt":"2019-02-19T14:32:34Z","isPatch":false,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"Hi Sebastián\n\nOn 19/02/2019 14:03, Sebastián Mancilla wrote:\n> My system is macOS Mojave 10.14.2. I normally use Git from Homebrew (currently\n> Git 2.20.1).\n> \n> I investigated this further, and I think I found the problem on my end.\n> \n> When I actually run \"git rebase --interactive <commit>\" from the terminal,\n> everything works fine.\n> \n> But almost every time I start my rebases from inside \"tig\" [0], for which I\n> have this mapping:\n> \n>          bind main R <git rebase -i %(commit)\n> \n> tig will exit after running that command, and then I normally continue working\n> on the rebase from the shell. And it is when I start the rebase this way that\n> \"git rebase --continue\" fails after solving conflicts.\n> \n> Second, I have tig installed with the Nix package manager [1], which shows\n> \n>          $ ~/.nix-profile/bin/tig --version\n>          tig version 2.4.1\n>          ncursesw version 6.1.20180127\n>          readline version 6.3\n> \n> So, I decided to try with tig from Homebrew, and then the problem\n> doesn't happen.\n> The Hombrew version of tig shows:\n> \n>          $ /usr/local/bin/tig --version\n>          tig version 2.4.1\n>          ncurses version 5.7.20081102\n>          readline version 8.0\n> \n> I will keep using tig from Homebrew to avoid issues for now.\n> \n> \n> In summary, the problem only happens when I start the rebase from inside tig,\n> but only when tig is the version from the Nix package manager, which has\n> different dependencies than the Homebrew version of tig.\n> And it happens for Git 2.20.x and master. Git <= 2.19.x works fine.\n> \n> \n> I also did bisect Git (I never though I would be bisecting Git itself).\n> It landed in this commit: 4d010a757c (sequencer: use read_author_script(),\n> 2018-10-31).\n> \n> And the content of .git/rebase-merge/author-script is always the same:\n> \n>          GIT_AUTHOR_NAME='Sebastián Mancilla'\n>          GIT_AUTHOR_EMAIL='smancill@jlab.org'\n>          GIT_AUTHOR_DATE='@1550530007 -0300\n> \n\nThanks for all the details, the problem is that the older version of git \nthat the Nix tig uses to start the rebase creates author scripts that \nare not correctly quoted (as you can see above) and cannot be read by \nthe newer version of git you were using to continue the rebase (it \nshould be possible to continue the rebase with the git bundled with Nix \ntig). Anyway I'm glad the Homebrew tig is working for you. When we made \nthis change and discussed whether we needed backwards compatibility I \nthink we only discussed the possibility of git being upgrading while a \nrebase was stopped for conflict resolution, not the possibility of \npeople having two different versions of git installed and using one to \nstart a rebase and the other to continue it.\n\nBest Wishes\n\nPhillip\n\n> Regards\n> \n> \n> [0]: https://github.com/jonas/tig\n> [1]: https://nixos.org/nix/\n> \n> El mar., 19 de feb. de 2019 a la(s) 06:59, Phillip Wood\n> (phillip.wood@talktalk.net) escribió:\n>>\n>> Dear Sebastián\n>>\n>> On 19/02/2019 07:22, Eric Sunshine wrote:\n>>> [cc:+phillip.wood@talktalk.net]\n>>\n>> Thanks Eric\n>>\n>>> On Tue, Feb 19, 2019 at 1:45 AM Christian Couder\n>>> <christian.couder@gmail.com> wrote:\n>>>> On Tue, Feb 19, 2019 at 5:20 AM Sebastián Mancilla <smancill.m@gmail.com> wrote:\n>>>>> But since Git 2.20.x it doesn't work anymore. Now after solving the conflicts\n>>>>> and running \"git rebase --continue\" I get this error most of the time:\n>>>>>\n>>>>>       error: unable to dequote value of 'GIT_AUTHOR_DATE'\n>>>>\n>>>> It looks like this can happen only when an \"author-script\" file (most\n>>>> likely .git/rebase-merge/author-script)\n>>\n>> or it could be .git/rebase-apply/author-script depending on the options\n>> passed to rebase when it started (the sequencer and am use the same code\n>> for reading the author script now)\n>>\n>>>> is read by the sequencer\n>>>> mechanism. Could you show us the content of this file on your machine?\n>>>\n>>> A very good suggestion considering that there have been changes\n>>> recently specifically related to the parsing of GIT_AUTHOR_DATE in C\n>>> code.\n>>\n>> That would be very helpful, without seeing that it's hard to know what\n>> the problem is.\n>>\n>> Best Wishes\n>>\n>> Phillip\n>>\n> \n> \n\n"}]}