git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: K Jayatheerth <jayatheerthkulkarni2005@gmail.com>, gitster@pobox.com
Cc: ak@akkartik.com, git@vger.kernel.org
Subject: Re: bug: `git pull --rebase` breaks in the presence of pushurls
Date: Thu, 11 Dec 2025 15:54:33 +0000	[thread overview]
Message-ID: <3a6f39cf-b35e-461f-84a7-85e6e7376d21@gmail.com> (raw)
In-Reply-To: <20251211053504.8758-1-jayatheerthkulkarni2005@gmail.com>

On 11/12/2025 05:35, K Jayatheerth wrote:
> 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.


  reply	other threads:[~2025-12-11 15:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-07 21:55 bug: `git pull --rebase` breaks in the presence of pushurls Kartik Agaram
2025-12-08 14:30 ` Phillip Wood
2025-12-08 16:04   ` Phillip Wood
2025-12-08 16:43   ` Kartik Agaram
2025-12-08 22:24   ` Junio C Hamano
2025-12-09  1:48     ` Kartik Agaram
2025-12-09 16:03       ` Phillip Wood
2025-12-10 14:25     ` Phillip Wood
2025-12-11  3:21       ` Junio C Hamano
2025-12-11  5:35         ` K Jayatheerth
2025-12-11 15:54           ` Phillip Wood [this message]
2025-12-11 19:39             ` Phillip Wood
2025-12-11 15:56         ` Phillip Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a6f39cf-b35e-461f-84a7-85e6e7376d21@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=ak@akkartik.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jayatheerthkulkarni2005@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).