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

Re: Possible git bug

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 16, 2021, 21:52 UTC
Message-ID
<xmqqmtocrxwq.fsf@gitster.g>
In-Reply-To
<3b4270f9-6139-7007-301b-8a084f4336cf@schwengle.net>
Wesley Schwengle <wesley@schwengle.net> writes:
> I feel like it is a bad default, it caught me by surprise.

I tend to agree. It seems that d44e7126 (pull: support rebased upstream + fetch + pull --rebase, 2009-07-19) started it, probably by mistake, which was partially corrected by ad8261d2 (rebase: use reflog to find common base with upstream, 2013-12-09).

The thread that contains
  https://lore.kernel.org/git/xmqq7gbdzsvt.fsf@gitster.dls.corp.google.com/

seems to have resulted in the design of the current behaviour, where the discussion refers to an even older discussion thread:

https://lore.kernel.org/git/d8e9f102609ee4502f579cb4ce872e0a40756204.1381949622.git.john@keeping.me.uk/
	Side note: I am kind-of surprised that I contributed the
	core computation of the fork-point logic, even though I
	wasn't buying it is a good feature back then.

In any case, updating the documentation to refer to the configuraion variable that tweaks the default for --fork-point would be a good near-term thing to do, but in the longer term, I think it may make sense to fix this "surprise" and transition the default over time, i.e.

 (1) when "git rebase" is run without --[no-]fork-point from the
     command line, and without rebase.forkpoint configuration
     variable in effect, give a warning that says we'll change the
     default to 'false' and the users who want to can use the
     configuration variable to force it to 'true'.  Update the
     documentation to say the special casing of "If <upstream> is
     not specified, --fork-point option is assumed" will be changed
     in the future.
     Ship such a version of Git and wait for several development
     cycles.
 (2) flip the default and remove the warning.  Update the
     documentation.
> As for the patch. The reason why --fork-point is default I do not
> know, but how to disable it isn't documented and I think it should. It
> is hidden in the source code and the release notes of 2.31.0. It
> should be more visible. Which is the reason I submitted the patch.
Certainly.

"git config --help" is the only end-user facing place the reference from the configuration variable to the command line option is found. We should also have a backreference from the command line option to the configuration variable.

Previous: Wesley SchwengleNext: Wesley Schwengle
Message 19 of 20 in “Possible git bug”
  1. Wesley SchwengleSep 16, 2021
  2. Taylor BlauSep 16, 2021
  3. Wesley SchwengleSep 16, 2021
  4. wesley@schwengle.netSep 16, 2021
  5. Document `rebase.forkpoint` in rebase man pagewesley@schwengle.net, Sep 16, 2021
  6. Junio C HamanoSep 16, 2021
  7. Junio C HamanoSep 16, 2021
  8. wesley@schwengle.netSep 16, 2021
  9. Document `rebase.forkpoint` in rebase man pagewesley@schwengle.net, Sep 16, 2021
  10. Junio C HamanoSep 16, 2021
  11. Wesley SchwengleSep 16, 2021
  12. Junio C HamanoSep 16, 2021
  13. Wesley SchwengleSep 20, 2021
  14. wesley@schwengle.netSep 16, 2021
  15. Document `rebase.forkpoint` in rebase man pagewesley@schwengle.net, Sep 16, 2021
  16. Junio C HamanoSep 20, 2021
  17. Junio C HamanoSep 16, 2021
  18. Wesley SchwengleSep 16, 2021
  19. Junio C HamanoSep 16, 2021
  20. Wesley SchwengleSep 16, 2021

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.