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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 15, 2023 at 7:27 PM 唐宇奕 <winglovet@xxxxxxxxx> 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?




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux