# [BUG] git pull -- error: nothing to do

2 messages from 2020-03-31 to 2020-04-01. Participants: _RuRo_ (Андрей Стоцкий), Denton Liu.
Thread: https://gitlist.dev/t/53144

## _RuRo_ (Андрей Стоцкий), 2020-03-31 16:15

Subject: [BUG] git pull -- error: nothing to do
Message-ID: <8017591585671131@myt3-605d5ea4bc20.qloud-c.yandex.net>
URL: https://gitlist.dev/e/8017591585671131%40myt3-605d5ea4bc20.qloud-c.yandex.net

```
After updating git from `v2.25.1` to `v2.26.0`, I've noticed that performing `git pull` on an up-to-date repository now results in a non-zero exit code and `error: nothing to do` on stderr.
With version 2.25.1, `git pull` used to finish with exit code 0 and `Current branch master is up to date.` on stdout.

The current (`v2.26.0`) behaviour only happens with the following config options:
ˋˋˋ
[pull]
    rebase = true
[rebase]
    autoSquash = true
    abbreviateCommands = true
ˋˋˋ
If any 1 of the 3 config options is not set, there is no error.

I think, this is a bug since many scripts and utilities rely on the exit code of `git pull` and the current behaviour causes false errors.

-- 
Andrey Stotskiy,
ruro.ruro@ya.ru

```

## Denton Liu, 2020-04-01 04:20

Subject: Re: [BUG] git pull -- error: nothing to do
Message-ID: <20200401042021.GA780945@generichostname>
URL: https://gitlist.dev/e/20200401042021.GA780945%40generichostname
In-Reply-To: <8017591585671131@myt3-605d5ea4bc20.qloud-c.yandex.net>

```
Hi Andrey,

On Tue, Mar 31, 2020 at 07:15:13PM +0300, _RuRo_ (Андрей Стоцкий) wrote:
> After updating git from `v2.25.1` to `v2.26.0`, I've noticed that performing `git pull` on an up-to-date repository now results in a non-zero exit code and `error: nothing to do` on stderr.
> With version 2.25.1, `git pull` used to finish with exit code 0 and `Current branch master is up to date.` on stdout.
> 
> The current (`v2.26.0`) behaviour only happens with the following config options:
> ˋˋˋ
> [pull]
>     rebase = true
> [rebase]
>     autoSquash = true
>     abbreviateCommands = true
> ˋˋˋ
> If any 1 of the 3 config options is not set, there is no error.
> 
> I think, this is a bug since many scripts and utilities rely on the exit code of `git pull` and the current behaviour causes false errors.

I believe that this bug has been reported already. Can you see if these
patches fix your problem:
https://lore.kernel.org/git/20200330124236.6716-1-alban.gruin@gmail.com/

-Denton

> -- 
> Andrey Stotskiy,
> ruro.ruro@ya.ru

```
