Re: pull.rebase config option broken in 2.33.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dmitry,

On Tue, Nov 2, 2021 at 7:09 AM Dmitry Marakasov <amdmi3@xxxxxxxxx> wrote:
>
> Hi!
>
> After update from 2.33.0 to 2.33.1 the pull.rebase = true option
> no longer works: `git pull` no longer tries to rebase (however manual
> `git pull --rebase` works fine):
>
> % git config pull.rebase
> true
> % git pull
> fatal: Not possible to fast-forward, aborting.

Was pull.ff also set?  As per
https://lore.kernel.org/git/xmqqzgr3pso7.fsf@gitster.g/, --ff-only
overrides --rebase if both are given on the command line, and by the
same token, pull.ff=only will override a pull.rebase=true if both are
set.

Yes, I know it's weird that we have two separate potentially
contradictory settings.  A single pull.mode would be better, but the
backward compatibility story to migrate is a long story.  Prior to
v2.33.1/v2.34.0, we had a bunch of untested and mishandled
interactions.

> % git pull --rebase
> Successfully rebased and updated refs/heads/local-fixes.

Right, the command-line options take precedence over config, so if you
add pull.ff=only, the --rebase overrides.

> % git pull
> fatal: Not possible to fast-forward, aborting.

This was the bug fixed in v2.34.1; see ea1954af77 ("pull: should be
noop when already-up-to-date", 2021-11-17)

> % grep -C1 rebase .git/config
> [pull]
>         rebase = true
> [rebase]
>         autostash = true
>
> After downgrade to 2.33.0:
>
> % git pull
> Current branch local-fixes is up to date.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux