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

Re: [RFC PATCH 0/2] Introduce new merge-tree-ort command

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 12, 2022, 18:06 UTC
Message-ID
<xmqqk0f4x20a.fsf@gitster.g>
In-Reply-To
<CABPp-BFei07srZBgyKs6HCm+G+hmPR-3_EkKjRK8WwGL1Uf2oA@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 8 quoted lines
>> And isn't any doubt around that even more reason to just go with
>> Elijah's plan of introducing new plumbing? I.e. is it really costing us
>> to just leave these "legacy merge" plumbing built-ins
>
> I definitely think it's worth guiding users away from the old `git
> merge-tree` behavior in documentation (i.e. deprecating it).  That may
> also lead towards its eventual removal, but I'm not as worried about
> that.

Yup, promising users that we will remove it and telling them that they should migrate away from it is necessary. Doing anything else is simply irresponsible.

I however suspect that Ævar didn't mean by "legacy merge plumbing built-in" the strategy backends. IOW, I had an impression that what is on the chopping block is merge-tree and not merge-recursive.

But since you brought up deprecation of recursive, let's spend a few minutes on the topic.

> `git merge-recursive` was actively used in various places, including
> in `git cherry-pick`.  I had used it a few times myself in a script.
> I don't see a need to deprecate it currently, which naturally would
> push its removal (if anyone is pushing for it) even further away.

I suspect that we may be able to just invoke ort when recursive is invoked, and such a wrapping may even be easier than wrapping "git blame" to replace "git annotate" (where a command line option or two needs to change behaviour). I doubt there is -X<strategy-option> that affects recursive that ORT does not understand, so it may be quite simple to deprecate "merge -s recursive".

As you say, replacing the internal implementation is a different matter.

Show 8 quoted lines
>   * `merge-recursive.c` is still hard-coded in three places in the
> code; you can't even set a configuration option to choose merge-ort.c
> in those places: builtin/am, builtin/merge-recursive, and
> builtin/stash.
>
> More details on that second point: All three of these use
> merge_recursive_generic() and need that usage to be replaced.  It's on
> my TODO list.

Yes, I do recall mentioning that when we were reviewing the series that added ort.

Previous: Elijah NewrenNext: Elijah Newren
Message 15 of 28 in “Introduce new merge-tree-ort command”
  1. 0/2 Introduce new merge-tree-ort commandChristian Couder, Jan 5, 2022
  2. 1/2 merge-ort: add new merge-tree-ort commandChristian Couder, Jan 5, 2022
  3. Elijah NewrenJan 5, 2022
  4. 2/2 merge-ort: add t/t4310-merge-tree-ort.shChristian Couder, Jan 5, 2022
  5. Elijah NewrenJan 5, 2022
  6. Elijah NewrenJan 5, 2022
  7. Elijah NewrenJan 5, 2022
  8. Christian CouderJan 7, 2022
  9. Elijah NewrenJan 7, 2022
  10. Johannes SchindelinJan 10, 2022
  11. Junio C HamanoJan 10, 2022
  12. Johannes SchindelinJan 11, 2022
  13. Ævar Arnfjörð BjarmasonJan 11, 2022
  14. Elijah NewrenJan 11, 2022
  15. Junio C HamanoJan 12, 2022
  16. Elijah NewrenJan 12, 2022
  17. Junio C HamanoJan 13, 2022
  18. Elijah NewrenJan 13, 2022
  19. Ævar Arnfjörð BjarmasonJan 13, 2022
  20. Junio C HamanoJan 12, 2022
  21. Ævar Arnfjörð BjarmasonJan 13, 2022
  22. Elijah NewrenJan 10, 2022
  23. Elijah NewrenJan 11, 2022
  24. Johannes SchindelinFeb 22, 2022
  25. Johannes SchindelinJan 11, 2022
  26. Elijah NewrenJan 12, 2022
  27. Johannes SchindelinFeb 22, 2022
  28. Johannes SchindelinJan 7, 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.