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

Re: Question about pre-merge and git merge octopus strategy

From
Junio C Hamano <gitster@pobox.com>
Date
May 7, 2022, 18:37 UTC
Message-ID
<xmqq8rrdgpeu.fsf@gitster.g>
In-Reply-To
<CABPp-BGD3AZvXwmSHfQQ_xh_UqevH23kdBYijAWUk8GHu1q0Qw@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
> However, I think Junio said that octopus merge only handles trivial
> cases anyway,...

"git merge -s octopus A B C" deliberately made a design decision to strongly discourage the users from creating an octopus that requires non-trivial merges. One of the reasons is because octopus merges make the history less efficient to bisect, and they are meant as a way to bind totally unrelated changes, whose order of merging into the resulting history does not matter.

Yes, it is an opinionated design choice, but "git merge" is a Porcelain that can afford to be opinionated. It also means that tools other than the git-merge--octopus backend does not have to follow the design philosophy.

> ... in which case an iterated "git merge --write-tree" would
> actually be a sufficient solution here and we could sidestep the more
> convoluted cases.  But, sadly for ZheNing, that option doesn't exist
> yet -- It's still under development.
Previous: Elijah NewrenNext: ZheNing Hu
Message 4 of 15 in “Question about pre-merge and git merge octopus strategy”
  1. ZheNing HuMay 6, 2022
  2. Christian CouderMay 6, 2022
  3. Elijah NewrenMay 7, 2022
  4. Junio C HamanoMay 7, 2022
  5. ZheNing HuMay 8, 2022
  6. Elijah NewrenMay 10, 2022
  7. ZheNing HuMay 11, 2022
  8. Elijah NewrenMay 12, 2022
  9. Junio C HamanoMay 12, 2022
  10. Elijah NewrenMay 13, 2022
  11. Junio C HamanoMay 13, 2022
  12. ZheNing HuMay 19, 2022
  13. Elijah NewrenMay 19, 2022
  14. ZheNing HuMay 8, 2022
  15. Carlo Marcelo Arenas BelónMay 8, 2022

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.