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

Re: [PATCH v3] merge-tree: add -X strategy option

From
Elijah Newren <newren@gmail.com>
Date
Sep 16, 2023, 03:21 UTC
Message-ID
<CABPp-BFDzn=3NzCKyL6aHK0ADbXXBoDhF_sGF8DRdj_VLKQ3SQ@mail.gmail.com>
In-Reply-To
<CAFWsj_UeK-5uyCtBfLYeRZXRMdAD_eFassxEo6FvgeVzmwqLNQ@mail.gmail.com>
On Fri, Sep 15, 2023 at 7:27 PM 唐宇奕 <winglovet@gmail.com> wrote:
>
> Thanks for your advice!
> I've fixed those blocking issues.
Thanks, you did fix most of them.  I left a comment on a few things on V3.
> However, regarding the global variable issue, I'm not familiar with C
> and git code and don't know how to solve this. I think perhaps we need
> something like closure to parse opt into a local variable?

You could merely make xopts, xopts_nr, and xopts_alloc local variables, and pass them around as needed. Closures would make things look cleaner perhaps, but certainly aren't necessarily.

But, I don't think the globals thing is a blocking issue, especially since we already have a number of unnecessary globals in that file already.

Show 5 quoted lines
> Our usecase is to achieve something like 'range-diff', we first use
> merge-tree to merge new patchset's base commit with old patchset's
> source commit, then use the merge result to diff against new
> patchset's source commit. So we only need to make sure conflict's are
> handled automatically, leaving other diff features to the second step.

If you're trying to do something like range-diff, then I don't see why there's any point in creating a merge at all. I'm afraid I don't follow your explanations about the steps you are taking and more importantly why you are taking them, and how it helps you achieve your goal of doing "something like 'range-diff'". Could you elaborate?

Previous: 唐宇奕Next: Elijah Newren
Message 9 of 27 in “merge-tree: add -X strategy option”
  1. merge-tree: add -X strategy optionIzzy via GitGitGadget, Aug 5, 2023
  2. Junio C HamanoAug 7, 2023
  3. merge-tree: add -X strategy optionIzzy via GitGitGadget, Aug 12, 2023
  4. 唐宇奕Aug 12, 2023
  5. 唐宇奕Sep 3, 2023
  6. Elijah NewrenSep 12, 2023
  7. merge-tree: add -X strategy optionIzzy via GitGitGadget, Sep 16, 2023
  8. 唐宇奕Sep 16, 2023
  9. Elijah NewrenSep 16, 2023
  10. Elijah NewrenSep 16, 2023
  11. merge-tree: add -X strategy optionIzzy via GitGitGadget, Sep 16, 2023
  12. Elijah NewrenSep 16, 2023
  13. 唐宇奕Sep 16, 2023
  14. Jeff KingSep 16, 2023
  15. merge-tree: add -X strategy optionIzzy via GitGitGadget, Sep 16, 2023
  16. 唐宇奕Sep 16, 2023
  17. Phillip WoodSep 18, 2023
  18. Junio C HamanoSep 18, 2023
  19. merge-tree: add -X strategy optionIzzy via GitGitGadget, Sep 24, 2023
  20. 唐宇奕Sep 24, 2023
  21. Phillip WoodOct 9, 2023
  22. Jeff KingOct 9, 2023
  23. Junio C HamanoOct 9, 2023
  24. Jeff KingOct 9, 2023
  25. Junio C HamanoOct 11, 2023
  26. Jeff KingOct 11, 2023
  27. Junio C HamanoOct 11, 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.