# git rebase --continue after solving conflicts doesn't work anymore

9 messages from 2019-02-19 to 2019-02-19. Participants: Sebastián Mancilla, Christian Couder, Eric Sunshine, Phillip Wood, Duy Nguyen.
Thread: https://gitlist.dev/t/50538

## Sebastián Mancilla, 2019-02-19 04:17

Subject: git rebase --continue after solving conflicts doesn't work anymore
Message-ID: <CAJPSwc1GuifK9BdssWQsf+oVY0Aw+PLM1pgAiis7UdV1tZrpew@mail.gmail.com>
URL: https://gitlist.dev/e/CAJPSwc1GuifK9BdssWQsf%2BoVY0Aw%2BPLM1pgAiis7UdV1tZrpew%40mail.gmail.com

```
I've always used "git rebase --continue" as the help shows:

    Resolve all conflicts manually, mark them as resolved with
    "git add/rm <conflicted_files>", then run "git rebase --continue".

and Git would apply the conflicted commit without issues and the rebase would
continue.

But since Git 2.20.x it doesn't work anymore. Now after solving the conflicts
and running "git rebase --continue" I get this error most of the time:

    error: unable to dequote value of 'GIT_AUTHOR_DATE'
    error: you have staged changes in your working tree
    If these changes are meant to be squashed into the previous commit, run:

      git commit --amend

    If they are meant to go into a new commit, run:

      git commit

    In both cases, once you're done, continue with:

      git rebase --continue

    error: could not commit staged changes.

Now I have to run "git commit" first to commit manually and then do the "git
rebase --continue".

I've compiled 2.18.2 and 2.19.2 to check and the error doesn't happen.

It is present in 2.20.x and current master v2.21.0-rc1-9-gca1b411648.


Is it a regression because of the new rebase written in C?


-- 
Sebastian Mancilla

```

## Christian Couder, 2019-02-19 06:45

Subject: Re: git rebase --continue after solving conflicts doesn't work anymore
Message-ID: <CAP8UFD22QMJyiJmQO1YVFmBkZuzex58+QBbTbdCCVHa8OGCQJA@mail.gmail.com>
URL: https://gitlist.dev/e/CAP8UFD22QMJyiJmQO1YVFmBkZuzex58%2BQBbTbdCCVHa8OGCQJA%40mail.gmail.com
In-Reply-To: <CAJPSwc1GuifK9BdssWQsf+oVY0Aw+PLM1pgAiis7UdV1tZrpew@mail.gmail.com>

```
On Tue, Feb 19, 2019 at 5:20 AM Sebastián Mancilla <smancill.m@gmail.com> wrote:
>
> I've always used "git rebase --continue" as the help shows:
>
>     Resolve all conflicts manually, mark them as resolved with
>     "git add/rm <conflicted_files>", then run "git rebase --continue".
>
> and Git would apply the conflicted commit without issues and the rebase would
> continue.
>
> But since Git 2.20.x it doesn't work anymore. Now after solving the conflicts
> and running "git rebase --continue" I get this error most of the time:
>
>     error: unable to dequote value of 'GIT_AUTHOR_DATE'

It looks like this can happen only when an "author-script" file (most
likely .git/rebase-merge/author-script) is read by the sequencer
mechanism. Could you show us the content of this file on your machine?
It could also help if you could give us information about your OS and
locale.

>     error: you have staged changes in your working tree
>     If these changes are meant to be squashed into the previous commit, run:
>
>       git commit --amend
>
>     If they are meant to go into a new commit, run:
>
>       git commit
>
>     In both cases, once you're done, continue with:
>
>       git rebase --continue
>
>     error: could not commit staged changes.
>
> Now I have to run "git commit" first to commit manually and then do the "git
> rebase --continue".
>
> I've compiled 2.18.2 and 2.19.2 to check and the error doesn't happen.
>
> It is present in 2.20.x and current master v2.21.0-rc1-9-gca1b411648.
>
>
> Is it a regression because of the new rebase written in C?

That's possible.

Thanks for the report,
Christian.

```

## Eric Sunshine, 2019-02-19 07:22

Subject: Re: git rebase --continue after solving conflicts doesn't work anymore
Message-ID: <CAPig+cQHx_BuxwZS7+juBdgKyAWhStU=9kFhs2hf=wjOMGAd7Q@mail.gmail.com>
URL: https://gitlist.dev/e/CAPig%2BcQHx_BuxwZS7%2BjuBdgKyAWhStU%3D9kFhs2hf%3DwjOMGAd7Q%40mail.gmail.com
In-Reply-To: <CAP8UFD22QMJyiJmQO1YVFmBkZuzex58+QBbTbdCCVHa8OGCQJA@mail.gmail.com>

```
[cc:+phillip.wood@talktalk.net]

On Tue, Feb 19, 2019 at 1:45 AM Christian Couder
<christian.couder@gmail.com> wrote:
> On Tue, Feb 19, 2019 at 5:20 AM Sebastián Mancilla <smancill.m@gmail.com> wrote:
> > But since Git 2.20.x it doesn't work anymore. Now after solving the conflicts
> > and running "git rebase --continue" I get this error most of the time:
> >
> >     error: unable to dequote value of 'GIT_AUTHOR_DATE'
>
> It looks like this can happen only when an "author-script" file (most
> likely .git/rebase-merge/author-script) is read by the sequencer
> mechanism. Could you show us the content of this file on your machine?

A very good suggestion considering that there have been changes
recently specifically related to the parsing of GIT_AUTHOR_DATE in C
code.

```

## Phillip Wood, 2019-02-19 09:59

Subject: Re: git rebase --continue after solving conflicts doesn't work anymore
Message-ID: <317468c6-40cc-9f26-8ee3-3392c3908efb@talktalk.net>
URL: https://gitlist.dev/e/317468c6-40cc-9f26-8ee3-3392c3908efb%40talktalk.net
In-Reply-To: <CAPig+cQHx_BuxwZS7+juBdgKyAWhStU=9kFhs2hf=wjOMGAd7Q@mail.gmail.com>

```
Dear Sebastián

On 19/02/2019 07:22, Eric Sunshine wrote:
> [cc:+phillip.wood@talktalk.net]

Thanks Eric

> On Tue, Feb 19, 2019 at 1:45 AM Christian Couder
> <christian.couder@gmail.com> wrote:
>> On Tue, Feb 19, 2019 at 5:20 AM Sebastián Mancilla <smancill.m@gmail.com> wrote:
>>> But since Git 2.20.x it doesn't work anymore. Now after solving the conflicts
>>> and running "git rebase --continue" I get this error most of the time:
>>>
>>>      error: unable to dequote value of 'GIT_AUTHOR_DATE'
>>
>> It looks like this can happen only when an "author-script" file (most
>> likely .git/rebase-merge/author-script)

or it could be .git/rebase-apply/author-script depending on the options 
passed to rebase when it started (the sequencer and am use the same code 
for reading the author script now)

>> is read by the sequencer
>> mechanism. Could you show us the content of this file on your machine?
> 
> A very good suggestion considering that there have been changes
> recently specifically related to the parsing of GIT_AUTHOR_DATE in C
> code.

That would be very helpful, without seeing that it's hard to know what 
the problem is.

Best Wishes

Phillip


```

## Sebastián Mancilla, 2019-02-19 14:03

Subject: Re: git rebase --continue after solving conflicts doesn't work anymore
Message-ID: <CAJPSwc0Xu=HoF5XrqnFj_1ZrshM3HFb78tJkXOTWZ=HJX8Akgg@mail.gmail.com>
URL: https://gitlist.dev/e/CAJPSwc0Xu%3DHoF5XrqnFj_1ZrshM3HFb78tJkXOTWZ%3DHJX8Akgg%40mail.gmail.com
In-Reply-To: <317468c6-40cc-9f26-8ee3-3392c3908efb@talktalk.net>

```
My system is macOS Mojave 10.14.2. I normally use Git from Homebrew (currently
Git 2.20.1).

I investigated this further, and I think I found the problem on my end.

When I actually run "git rebase --interactive <commit>" from the terminal,
everything works fine.

But almost every time I start my rebases from inside "tig" [0], for which I
have this mapping:

        bind main R <git rebase -i %(commit)

tig will exit after running that command, and then I normally continue working
on the rebase from the shell. And it is when I start the rebase this way that
"git rebase --continue" fails after solving conflicts.

Second, I have tig installed with the Nix package manager [1], which shows

        $ ~/.nix-profile/bin/tig --version
        tig version 2.4.1
        ncursesw version 6.1.20180127
        readline version 6.3

So, I decided to try with tig from Homebrew, and then the problem
doesn't happen.
The Hombrew version of tig shows:

        $ /usr/local/bin/tig --version
        tig version 2.4.1
        ncurses version 5.7.20081102
        readline version 8.0

I will keep using tig from Homebrew to avoid issues for now.


In summary, the problem only happens when I start the rebase from inside tig,
but only when tig is the version from the Nix package manager, which has
different dependencies than the Homebrew version of tig.
And it happens for Git 2.20.x and master. Git <= 2.19.x works fine.


I also did bisect Git (I never though I would be bisecting Git itself).
It landed in this commit: 4d010a757c (sequencer: use read_author_script(),
2018-10-31).

And the content of .git/rebase-merge/author-script is always the same:

        GIT_AUTHOR_NAME='Sebastián Mancilla'
        GIT_AUTHOR_EMAIL='smancill@jlab.org'
        GIT_AUTHOR_DATE='@1550530007 -0300


Regards


[0]: https://github.com/jonas/tig
[1]: https://nixos.org/nix/

El mar., 19 de feb. de 2019 a la(s) 06:59, Phillip Wood
(phillip.wood@talktalk.net) escribió:
>
> Dear Sebastián
>
> On 19/02/2019 07:22, Eric Sunshine wrote:
> > [cc:+phillip.wood@talktalk.net]
>
> Thanks Eric
>
> > On Tue, Feb 19, 2019 at 1:45 AM Christian Couder
> > <christian.couder@gmail.com> wrote:
> >> On Tue, Feb 19, 2019 at 5:20 AM Sebastián Mancilla <smancill.m@gmail.com> wrote:
> >>> But since Git 2.20.x it doesn't work anymore. Now after solving the conflicts
> >>> and running "git rebase --continue" I get this error most of the time:
> >>>
> >>>      error: unable to dequote value of 'GIT_AUTHOR_DATE'
> >>
> >> It looks like this can happen only when an "author-script" file (most
> >> likely .git/rebase-merge/author-script)
>
> or it could be .git/rebase-apply/author-script depending on the options
> passed to rebase when it started (the sequencer and am use the same code
> for reading the author script now)
>
> >> is read by the sequencer
> >> mechanism. Could you show us the content of this file on your machine?
> >
> > A very good suggestion considering that there have been changes
> > recently specifically related to the parsing of GIT_AUTHOR_DATE in C
> > code.
>
> That would be very helpful, without seeing that it's hard to know what
> the problem is.
>
> Best Wishes
>
> Phillip
>


-- 
Sebastian Mancilla

```

## Duy Nguyen, 2019-02-19 14:14

Subject: Re: git rebase --continue after solving conflicts doesn't work anymore
Message-ID: <CACsJy8Crn3mnXkwj_CQ1capeAXT=Jvn5S-HdnKsTLJZvdH=ObQ@mail.gmail.com>
URL: https://gitlist.dev/e/CACsJy8Crn3mnXkwj_CQ1capeAXT%3DJvn5S-HdnKsTLJZvdH%3DObQ%40mail.gmail.com
In-Reply-To: <CAJPSwc0Xu=HoF5XrqnFj_1ZrshM3HFb78tJkXOTWZ=HJX8Akgg@mail.gmail.com>

```
On Tue, Feb 19, 2019 at 9:04 PM Sebastián Mancilla <smancill.m@gmail.com> wrote:
> And the content of .git/rebase-merge/author-script is always the same:
>
>         GIT_AUTHOR_NAME='Sebastián Mancilla'
>         GIT_AUTHOR_EMAIL='smancill@jlab.org'
>         GIT_AUTHOR_DATE='@1550530007 -0300
>

Just to be clear, the lack of closing quote on the last line is not a
typo right?
-- 
Duy

```

## Christian Couder, 2019-02-19 14:18

Subject: Re: git rebase --continue after solving conflicts doesn't work anymore
Message-ID: <CAP8UFD2a6D1W_X0T3O8FTinBwVC1qoBk+jx84B-dQzRrieu_Xw@mail.gmail.com>
URL: https://gitlist.dev/e/CAP8UFD2a6D1W_X0T3O8FTinBwVC1qoBk%2Bjx84B-dQzRrieu_Xw%40mail.gmail.com
In-Reply-To: <CAJPSwc0Xu=HoF5XrqnFj_1ZrshM3HFb78tJkXOTWZ=HJX8Akgg@mail.gmail.com>

```
On Tue, Feb 19, 2019 at 3:03 PM Sebastián Mancilla <smancill.m@gmail.com> wrote:
>
> My system is macOS Mojave 10.14.2. I normally use Git from Homebrew (currently
> Git 2.20.1).
>
> I investigated this further, and I think I found the problem on my end.

[...]

> I also did bisect Git (I never though I would be bisecting Git itself).
> It landed in this commit: 4d010a757c (sequencer: use read_author_script(),
> 2018-10-31).

Thanks for investigating this.

> And the content of .git/rebase-merge/author-script is always the same:
>
>         GIT_AUTHOR_NAME='Sebastián Mancilla'
>         GIT_AUTHOR_EMAIL='smancill@jlab.org'
>         GIT_AUTHOR_DATE='@1550530007 -0300

When I look at such a file I get the following:

GIT_AUTHOR_DATE='@1549569954 -0800'

so it seems to me that a single quote is missing at the end of the
line in your file, which might explain the error.

Not sure which software is writing this file, but from what you
described it might be the tig you had previously installed.

```

## Sebastián Mancilla, 2019-02-19 14:25

Subject: Re: git rebase --continue after solving conflicts doesn't work anymore
Message-ID: <CAJPSwc3-=ByzxTQirg9==6G4tUcR+0Bzc0cfknOWNCmb6e8hCw@mail.gmail.com>
URL: https://gitlist.dev/e/CAJPSwc3-%3DByzxTQirg9%3D%3D6G4tUcR%2B0Bzc0cfknOWNCmb6e8hCw%40mail.gmail.com
In-Reply-To: <CACsJy8Crn3mnXkwj_CQ1capeAXT=Jvn5S-HdnKsTLJZvdH=ObQ@mail.gmail.com>

```
No, it's not a typo. I just checked again.

That's the file that results when I start the rebase from tig (the Nix
version), which results in the error for rebase --continue.

When I start the rebase manually or from tig (the Homebrew version)
it has the quote.

        GIT_AUTHOR_NAME='Sebastián Mancilla'
        GIT_AUTHOR_EMAIL='smancill@jlab.org'
        GIT_AUTHOR_DATE='@1550530007 -0300'


Regards

El mar., 19 de feb. de 2019 a la(s) 11:15, Duy Nguyen
(pclouds@gmail.com) escribió:
>
> On Tue, Feb 19, 2019 at 9:04 PM Sebastián Mancilla <smancill.m@gmail.com> wrote:
> > And the content of .git/rebase-merge/author-script is always the same:
> >
> >         GIT_AUTHOR_NAME='Sebastián Mancilla'
> >         GIT_AUTHOR_EMAIL='smancill@jlab.org'
> >         GIT_AUTHOR_DATE='@1550530007 -0300
> >
>
> Just to be clear, the lack of closing quote on the last line is not a
> typo right?
> --
> Duy



-- 
Sebastian Mancilla

```

## Phillip Wood, 2019-02-19 14:32

Subject: Re: git rebase --continue after solving conflicts doesn't work anymore
Message-ID: <d7acf780-522d-84e6-68b8-d8d35a305588@talktalk.net>
URL: https://gitlist.dev/e/d7acf780-522d-84e6-68b8-d8d35a305588%40talktalk.net
In-Reply-To: <CAJPSwc0Xu=HoF5XrqnFj_1ZrshM3HFb78tJkXOTWZ=HJX8Akgg@mail.gmail.com>

```
Hi Sebastián

On 19/02/2019 14:03, Sebastián Mancilla wrote:
> My system is macOS Mojave 10.14.2. I normally use Git from Homebrew (currently
> Git 2.20.1).
> 
> I investigated this further, and I think I found the problem on my end.
> 
> When I actually run "git rebase --interactive <commit>" from the terminal,
> everything works fine.
> 
> But almost every time I start my rebases from inside "tig" [0], for which I
> have this mapping:
> 
>          bind main R <git rebase -i %(commit)
> 
> tig will exit after running that command, and then I normally continue working
> on the rebase from the shell. And it is when I start the rebase this way that
> "git rebase --continue" fails after solving conflicts.
> 
> Second, I have tig installed with the Nix package manager [1], which shows
> 
>          $ ~/.nix-profile/bin/tig --version
>          tig version 2.4.1
>          ncursesw version 6.1.20180127
>          readline version 6.3
> 
> So, I decided to try with tig from Homebrew, and then the problem
> doesn't happen.
> The Hombrew version of tig shows:
> 
>          $ /usr/local/bin/tig --version
>          tig version 2.4.1
>          ncurses version 5.7.20081102
>          readline version 8.0
> 
> I will keep using tig from Homebrew to avoid issues for now.
> 
> 
> In summary, the problem only happens when I start the rebase from inside tig,
> but only when tig is the version from the Nix package manager, which has
> different dependencies than the Homebrew version of tig.
> And it happens for Git 2.20.x and master. Git <= 2.19.x works fine.
> 
> 
> I also did bisect Git (I never though I would be bisecting Git itself).
> It landed in this commit: 4d010a757c (sequencer: use read_author_script(),
> 2018-10-31).
> 
> And the content of .git/rebase-merge/author-script is always the same:
> 
>          GIT_AUTHOR_NAME='Sebastián Mancilla'
>          GIT_AUTHOR_EMAIL='smancill@jlab.org'
>          GIT_AUTHOR_DATE='@1550530007 -0300
> 

Thanks for all the details, the problem is that the older version of git 
that the Nix tig uses to start the rebase creates author scripts that 
are not correctly quoted (as you can see above) and cannot be read by 
the newer version of git you were using to continue the rebase (it 
should be possible to continue the rebase with the git bundled with Nix 
tig). Anyway I'm glad the Homebrew tig is working for you. When we made 
this change and discussed whether we needed backwards compatibility I 
think we only discussed the possibility of git being upgrading while a 
rebase was stopped for conflict resolution, not the possibility of 
people having two different versions of git installed and using one to 
start a rebase and the other to continue it.

Best Wishes

Phillip

> Regards
> 
> 
> [0]: https://github.com/jonas/tig
> [1]: https://nixos.org/nix/
> 
> El mar., 19 de feb. de 2019 a la(s) 06:59, Phillip Wood
> (phillip.wood@talktalk.net) escribió:
>>
>> Dear Sebastián
>>
>> On 19/02/2019 07:22, Eric Sunshine wrote:
>>> [cc:+phillip.wood@talktalk.net]
>>
>> Thanks Eric
>>
>>> On Tue, Feb 19, 2019 at 1:45 AM Christian Couder
>>> <christian.couder@gmail.com> wrote:
>>>> On Tue, Feb 19, 2019 at 5:20 AM Sebastián Mancilla <smancill.m@gmail.com> wrote:
>>>>> But since Git 2.20.x it doesn't work anymore. Now after solving the conflicts
>>>>> and running "git rebase --continue" I get this error most of the time:
>>>>>
>>>>>       error: unable to dequote value of 'GIT_AUTHOR_DATE'
>>>>
>>>> It looks like this can happen only when an "author-script" file (most
>>>> likely .git/rebase-merge/author-script)
>>
>> or it could be .git/rebase-apply/author-script depending on the options
>> passed to rebase when it started (the sequencer and am use the same code
>> for reading the author script now)
>>
>>>> is read by the sequencer
>>>> mechanism. Could you show us the content of this file on your machine?
>>>
>>> A very good suggestion considering that there have been changes
>>> recently specifically related to the parsing of GIT_AUTHOR_DATE in C
>>> code.
>>
>> That would be very helpful, without seeing that it's hard to know what
>> the problem is.
>>
>> Best Wishes
>>
>> Phillip
>>
> 
> 


```
