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

Re: bug: `git pull --rebase` breaks in the presence of pushurls

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Dec 11, 2025, 15:56 UTC
Message-ID
<177a25f0-7292-4ee7-8a02-9c90a5979313@gmail.com>
In-Reply-To
<xmqqpl8lg0u3.fsf@gitster.g>
On 11/12/2025 03:21, Junio C Hamano wrote:
Show 17 quoted lines
> Phillip Wood <phillip.wood123@gmail.com> writes:
> 
>> "git pull" already runs "git merge-base --fork-point" before it runs
>> "git fetch". The problematic reflog entry comes from a previous push
>> which pushes to a different server due to remote.<remote>.pushurl.
> 
> Ah, of course.  fork-point heuristics with a repository you yourself
> push into would not make all that sense, since you are in control
> when and what to push there in the first place :/.
> 
>> Because we've just successfully pushed the local branch the fork point
>> calculation thinks the remote tracking branch matches the local branch
>> and so excludes all the local commits when we rebase but we didn't push
>> it to the same server that we're fetching from. I wonder if we should
>> disable the fork point calculation when there is a pushurl set.
> 
> Tempting thought.  Or educate users with diagnoses and advise()?

If we do that we'll also need to provide a way for the user to skip using the fork point when pulling. At the moment I think there is way for the user to turn it off.

Thanks
Phillip
Previous: Phillip Wood
Message 13 of 13 in “bug: `git pull --rebase` breaks in the presence of pushurls”
  1. Kartik AgaramDec 7, 2025
  2. Phillip WoodDec 8, 2025
  3. Phillip WoodDec 8, 2025
  4. Kartik AgaramDec 8, 2025
  5. Junio C HamanoDec 8, 2025
  6. Kartik AgaramDec 9, 2025
  7. Phillip WoodDec 9, 2025
  8. Phillip WoodDec 10, 2025
  9. Junio C HamanoDec 11, 2025
  10. K JayatheerthDec 11, 2025
  11. Phillip WoodDec 11, 2025
  12. Phillip WoodDec 11, 2025
  13. Phillip WoodDec 11, 2025

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.