git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [BUG] git pull -- error: nothing to do
@ 2020-03-31 16:15 _RuRo_ (Андрей Стоцкий)
  2020-04-01  4:20 ` Denton Liu
  0 siblings, 1 reply; 3+ messages in thread
From: _RuRo_ (Андрей Стоцкий) @ 2020-03-31 16:15 UTC (permalink / raw)
  To: git@vger.kernel.org

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] git pull -- error: nothing to do
  2020-03-31 16:15 [BUG] git pull -- error: nothing to do _RuRo_ (Андрей Стоцкий)
@ 2020-04-01  4:20 ` Denton Liu
  0 siblings, 0 replies; 3+ messages in thread
From: Denton Liu @ 2020-04-01  4:20 UTC (permalink / raw)
  To: _RuRo_ (Андрей Стоцкий)
  Cc: git@vger.kernel.org

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] git pull -- error: nothing to do
@ 2020-04-01  8:03 _RuRo_ (Андрей Стоцкий)
  0 siblings, 0 replies; 3+ messages in thread
From: _RuRo_ (Андрей Стоцкий) @ 2020-04-01  8:03 UTC (permalink / raw)
  To: liu.denton@gmail.com; +Cc: git@vger.kernel.org, ruro.ruro@ya.ru

Hi.

> I believe that this bug has been reported already.

My bad, I only searched for `git pull` and `error: nothing to do` related issues.
Didn't think to also check `rebase.abbreviateCommands`.

> Can you see if these patches fix your problem:
> https://lore.kernel.org/git/20200330124236.6716-1-alban.gruin@gmail.com/

Yes, I've just built git from the source of current `master` branch with this patch applied:
https://github.com/git/git/commit/a85ddbbb106edaaaeca34295a86aebd422479ed2.patch
And the issue seems to be fixed.

Many thanks.

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-01  8:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 16:15 [BUG] git pull -- error: nothing to do _RuRo_ (Андрей Стоцкий)
2020-04-01  4:20 ` Denton Liu
  -- strict thread matches above, loose matches on Subject: below --
2020-04-01  8:03 _RuRo_ (Андрей Стоцкий)

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).