git/list[1] front-page[2] threads[3] people[4] search[5] about
 

pull.ff = only vs. branch.<name>.rebase = true problem

From
HGHerman, Geza <geza.herman@gmail.com>
Date
Jan 31, 2022, 22:02 UTC
Message-ID
<487ff4cc-7683-8282-d398-cda9230f2eb4@gmail.com>
Hi,

I saw a similar bug report two months ago ("pull.rebase config option broken in 2.33.1"), but it was only about pull.ff=only and pull.rebase. My issue is that if "pull.ff = only" is set, then even if "branch.<name>.rebase = true", the pull fails because

"fatal: Not possible to fast-forward, aborting."
But because of the branch settings, I'd expect a rebase here.
I modified the script in the previous bug report to show the issue:
--- 8< -------------

git init repo cd repo

commit() {
     echo $1 >$1
     git add $1
     git commit -m $1
}

git checkout -b local commit base commit local

git checkout -b remote HEAD^ commit remote

git checkout local git config pull.ff only git config branch.local.rebase true git pull . remote

--- 8< -------------

This script succeeds with previous versions of git, but with the latest one it fails.

My use case is this: I use "pull.ff=only" in my ~/.gitconfig to avoid any accidental merges throughout all my repos and branches. But, on branches where I do actual work, I usually rebase, so I set "branch.<name>.rebase = true" on these branches. Previously this worked, but now it has this problem.

Thanks, Geza Herman

Message 1 of 1 in “pull.ff = only vs. branch.<name>.rebase = true problem”
  1. Herman, GezaJan 31, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.