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

Re: [PATCH 1/2] builtin/rebase.c: Emit warning when rebasing without a forkpoint

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 2, 2023, 22:36 UTC
Message-ID
<xmqqo7ikkxrq.fsf@gitster.g>
In-Reply-To
<fa702b47-ae29-4299-9226-4920620b9fff@opperschaap.net>
Wesley <wesleys@opperschaap.net> writes:
Show 12 quoted lines
> On 9/1/23 14:10, Junio C Hamano wrote:
>> 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?
>
> I do not know? I tested with a bare repo and two clones. And I also
> tested it with just a remote upstream in another branch.

IIRC, a non-bare repository (i.e. with working tree) should get core.logallrefupdates set to true by default, so all your refs, not just local and remote-tracking branches, should have records.

> I haven't force pushed anything btw, maybe that could explain things?

If your "remote" is never force-pushed, then the movements of refs at the remote (which you will observe whenever you fetch from it) will always fast-forward, and the remote-tracking branches in your local repository that keeps track of the movement will also record the fast-forwarding movement in the reflog. But then there is no need for the fork-point heurisitics to trigger, and even if it triggered the heuristics would not change the outcome, when rebasing against such a remote branch, as their tip will always a decendant of all commits that ever sat at the tip of that remote branch.

Previous: WesleyNext: Wesley Schwengle
Message 21 of 23 in “builtin/rebase.c: Emit warning when rebasing without a forkpoint”
  1. 1/2 builtin/rebase.c: Emit warning when rebasing without a forkpointWesley Schwengle, Aug 19, 2023
  2. 1/2 builtin/rebase.c: Emit warning when rebasing without a forkpointWesley Schwengle, Aug 19, 2023
  3. Junio C HamanoAug 31, 2023
  4. Junio C HamanoAug 31, 2023
  5. Phillip WoodSep 1, 2023
  6. Junio C HamanoSep 1, 2023
  7. Emit warning when rebasing without a forkpointWesley Schwengle, Sep 2, 2023
  8. 2/3 builtin/rebase.c: Emit warning when rebasing without a forkpointWesley Schwengle, Sep 2, 2023
  9. Junio C HamanoSep 2, 2023
  10. WesleySep 3, 2023
  11. Junio C HamanoSep 3, 2023
  12. Wesley SchwengleSep 3, 2023
  13. Junio C HamanoSep 5, 2023
  14. Phillip WoodSep 4, 2023
  15. 1/3 rebase.c: Make a distiction between rebase.forkpoint and --fork-point argumentsWesley Schwengle, Sep 2, 2023
  16. 3/3 git-rebase.txt: Add deprecation notice to the --fork-point optionsWesley Schwengle, Sep 2, 2023
  17. Phillip WoodSep 1, 2023
  18. WesleySep 1, 2023
  19. Junio C HamanoSep 1, 2023
  20. WesleySep 2, 2023
  21. Junio C HamanoSep 2, 2023
  22. 2/2 git-rebase.txt: Add deprecation notice to the --fork-point optionsWesley Schwengle, Aug 19, 2023
  23. Wesley SchwengleAug 31, 2023

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.