Thread (4 messages) flat view 4 messages, 3 authors, 2025-12-10

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

From: Junio C Hamano <hidden>
Date: 2025-12-08 22:24:04

Phillip Wood [off-list ref] writes:
"git push" updates refs/remotes/origin/master when pushing to "mirror".
quoted
8. Try to fix the problem:

   git pull --rebase
"git pull" tries to find the fork point between origin/master and master 
which is the tip of master because "git push" just updated origin/master 
to point to the same commit as master.

Unfortunately I'm not sure there is an easy way to fix this. For now I'd 
recommend doing

	git fetch && git rebase --no-fork-point

instead of running "git pull --rebase".
Yeah, it is an integral part of "fetch" to update the
remote-tracking branches, so this is harder to fix.

It may be possible to stop doing the fork-point computation in the
"git rebase" phase, and instead do it _before_ we run "git fetch",
to figure out what part of our history needs to be transplanted on
top of the upstream, run "git fetch" (to let the tracking branches
updated), and then run "git rebase", telling it exactly what range
should be transplanted onto which commit to update the branch
currently checked out.  That would be a much larger change.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help