Re: [PATCH 1/2] builtin/rebase.c: Emit warning when rebasing without a forkpoint
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 1, 2023, 18:10 UTC
- Message-ID
- <xmqqledppxw3.fsf@gitster.g>
- In-Reply-To
- <a168fe69-f305-4280-b0e6-9406fbac796f@opperschaap.net>
Wesley <wesleys@opperschaap.net> writes:
> The quirk is this: --fork-point looks at the reflog and reflog is > local. Meaning, having an remote upstream branch will make > --fork-point a noop. Only where you have an upstream which is local > and your reflog has seen dropped commits it does something.
Why do you lack reflog on your remote-tracking branches in the first place?
The fork-point heuristics, as far as I understand it, was invented exactly to protect you from your upstream repository rewinding and rebuilding the branch you have been building on top of. The default fetch refspec +refs/heads/*:refs/remotes/origin/* has the "force" option "+" in front exactly because the fetching repository is expected to keep the reflog for remote-tracking branches to help recovering from such a rewind & rebuild.
Puzzled.