git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elijah Newren <newren@gmail.com>
To: 唐宇奕 <winglovet@gmail.com>
Cc: Izzy via GitGitGadget <gitgitgadget@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH v3] merge-tree: add -X strategy option
Date: Fri, 15 Sep 2023 20:21:00 -0700	[thread overview]
Message-ID: <CABPp-BFDzn=3NzCKyL6aHK0ADbXXBoDhF_sGF8DRdj_VLKQ3SQ@mail.gmail.com> (raw)
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.

> 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?

  reply	other threads:[~2023-09-16  3:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-05 14:24 [PATCH] merge-tree: add -X strategy option Izzy via GitGitGadget
2023-08-07  2:10 ` Junio C Hamano
2023-08-12  5:33 ` [PATCH v2] " Izzy via GitGitGadget
2023-08-12  5:41   ` 唐宇奕
2023-09-03  1:31     ` 唐宇奕
2023-09-12 15:03   ` Elijah Newren
2023-09-16  2:14   ` [PATCH v3] " Izzy via GitGitGadget
2023-09-16  2:26     ` 唐宇奕
2023-09-16  3:21       ` Elijah Newren [this message]
2023-09-16  3:16     ` Elijah Newren
2023-09-16  3:47     ` [PATCH v4] " Izzy via GitGitGadget
2023-09-16  3:55       ` Elijah Newren
2023-09-16  4:04       ` 唐宇奕
2023-09-16  6:11       ` Jeff King
2023-09-16  8:37       ` [PATCH v5] " Izzy via GitGitGadget
2023-09-16  8:38         ` 唐宇奕
2023-09-18  9:53         ` Phillip Wood
2023-09-18 16:08           ` Junio C Hamano
2023-09-24  2:23         ` [PATCH v6] " Izzy via GitGitGadget
2023-09-24  2:26           ` 唐宇奕
2023-10-09  9:58           ` Phillip Wood
2023-10-09 15:53             ` Jeff King
2023-10-09 17:10               ` Junio C Hamano
2023-10-09 18:52                 ` Jeff King
2023-10-11 19:38                   ` Junio C Hamano
2023-10-11 21:43                     ` Jeff King
2023-10-11 22:19                       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABPp-BFDzn=3NzCKyL6aHK0ADbXXBoDhF_sGF8DRdj_VLKQ3SQ@mail.gmail.com' \
    --to=newren@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=winglovet@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).