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:54 UTC
Message-ID
<3a6f39cf-b35e-461f-84a7-85e6e7376d21@gmail.com>
In-Reply-To
<20251211053504.8758-1-jayatheerthkulkarni2005@gmail.com>
On 11/12/2025 05:35, K Jayatheerth wrote:
Show 8 quoted lines
> I’m trying to make sure I fully understand where the fork-point behavior is coming from.
> I'm assuming get_rebase_fork_point() and get_rebase_newbase_and_upstream() are responsible.
> 
> And when we talk about the “fork-point heuristic” here,
> we mean the logic that uses the reflog of the upstream branch
> to detect whether the user has previously rebased or reset,
> and uses that information to choose a
> different merge-base than the raw merge-base HEAD upstream, correct?

Almost, it uses the reflog of the upstream branch to find the most recent entry that is a descendant of the local branch. It then uses that commit to limit the range of commits that get rebased in case the upstream branch has been reset or rewritten. There is a diagram in the documentation [1] which might help.

Thanks
Phillip
[1] https://git-scm.com/docs/git-merge-base#_discussion_on_fork_point_mode
> Just checking that I’m following correctly
> before thinking about possible approaches.
Previous: K JayatheerthNext: Phillip Wood
Message 11 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.