Re: pull.rebase config option broken in 2.33.1
- From
Elijah Newren <newren@gmail.com>
- Date
- Nov 27, 2021, 05:27 UTC
- Message-ID
- <CABPp-BFdtEB5chYz9tPxJ=M-4U408P7apiROD1-538sb5+aiDg@mail.gmail.com>
- In-Reply-To
- <YYFEE/2g3SiM04zx@hades.panopticon>
Hi Dmitry,
On Tue, Nov 2, 2021 at 7:09 AM Dmitry Marakasov <amdmi3@amdmi3.ru> wrote:
Show 11 quoted lines
> > 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)
Show 10 quoted lines
> % 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.