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

Re: [PATCH 0/2] [RFC] Switch default merge backend from recursive to ort

From
Jeff King <peff@peff.net>
Date
Aug 3, 2021, 17:13 UTC
Message-ID
<YQl5SlmJsFbQ3Kw+@coredump.intra.peff.net>
In-Reply-To
<CABPp-BGgcpMbFrEjaDxpfb8=Wr_5O76qCDq1OSbpemrnYDcsqw@mail.gmail.com>
On Tue, Aug 03, 2021 at 10:57:12AM -0600, Elijah Newren wrote:
Show 31 quoted lines
> > The nice thing is that the two strategies can co-exist. So if it does
> > turn out to have any regressions, it's an easy revert to switch back,
> > and even post-release users can switch at runtime. We have pull.twohead,
> > but I don't think we have an equivalent that would impact a bare "git
> > merge" or "git rebase -m". Maybe it would be worth adding those as an
> > escape hatch?
> 
> Actually, pull.twohead is not pull specific; it already affects merge,
> rebase (-m is the default for rebase, btw), cherry-pick, and revert.
> pull.twohead has affected a bare "git merge" since 1c7b76be7d ("Build
> in merge", 2008-07-07).  I thought it was weird that "merge strategy"
> for the merge command was specified via a config option under "pull",
> and included my misgivings about it in the commit message of
> 14c4586c2d ("merge,rebase,revert: select ort or recursive by config or
> environment", 2020-11-02) when I made sequencer.c pay attention to
> that config option as well:
> 
> """
>     Also, allow folks to pick the new algorithm via config setting.  It
>     turns out builtin/merge.c already had a way to allow users to specify a
>     different default merge algorithm: pull.twohead.  Rather odd
>     configuration name (especially to be in the 'pull' namespace rather than
>     'merge') but it's there.  Add that same configuration to rebase,
>     cherry-pick, and revert.
> """
>
> But no one had an alternate suggestion or opinion on attempting to
> migrate the configuration to a different name, so it has just stuck.
> Anyway, if folks want to try out 'ort' with the 2.32 or 2.33 releases,
> they can set pull.twohead=ort.  Once we switch the default, they can
> set pull.twohead=recursive to get the old default.

Ah, thanks for clarifying. I think we are in good shape, then. We could possibly introduce merge.twohead as a synonym, but given that most people would probably not ever even look at this, it may not be worth worrying about.

-Peff
Previous: Elijah NewrenNext: Junio C Hamano
Message 17 of 21 in “[RFC] Switch default merge backend from recursive to ort”
  1. 0/2 [RFC] Switch default merge backend from recursive to ortElijah Newren via GitGitGadget, Aug 1, 2021
  2. 1/2 Change default merge backend from recursive to ortElijah Newren via GitGitGadget, Aug 1, 2021
  3. Ævar Arnfjörð BjarmasonAug 2, 2021
  4. Elijah NewrenAug 2, 2021
  5. Johannes SchindelinAug 2, 2021
  6. Elijah NewrenAug 3, 2021
  7. Philippe BlainAug 3, 2021
  8. Elijah NewrenAug 3, 2021
  9. 2/2 Update docs for change of default merge backendElijah Newren via GitGitGadget, Aug 1, 2021
  10. Derrick StoleeAug 2, 2021
  11. Elijah NewrenAug 3, 2021
  12. Derrick StoleeAug 2, 2021
  13. Elijah NewrenAug 2, 2021
  14. Derrick StoleeAug 2, 2021
  15. Jeff KingAug 3, 2021
  16. Elijah NewrenAug 3, 2021
  17. Jeff KingAug 3, 2021
  18. Junio C HamanoAug 3, 2021
  19. Jeff KingAug 3, 2021
  20. Elijah NewrenAug 3, 2021
  21. Elijah NewrenAug 3, 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.