Re: [PATCH v2 26/33] diff-merges: let new options enable diff without -p

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

 



Sergey Organov <sorganov@xxxxxxxxx> writes:

> Elijah Newren <newren@xxxxxxxxx> writes:
>
>> On Wed, Dec 16, 2020 at 10:50 AM Sergey Organov <sorganov@xxxxxxxxx> wrote:
>>>

[...]

>>
>>>         else if (!strcmp(optarg, "first") || !strcmp(optarg, "first-parent"))
>>>                 set_first_parent(revs);
>>>         else if (!strcmp(optarg, "sep")   || !strcmp(optarg, "separate"))
>>> @@ -64,6 +67,7 @@ static void set_diff_merges(struct rev_info *revs, const char *optarg)
>>>                 set_dense_combined(revs);
>>>         else
>>>                 die(_("unknown value for --diff-merges: %s"), optarg);
>>> +       revs->merges_need_diff = 1;
>>
>> I'd put this above the if-else-else block, to make it clearer why you
>> are returning early for the "off"/"none" case.
>
> Yeah, makes sense, thanks!

In fact this can't be done as it changes the outcome, as set_xxx()
functions clear the flag.

I rather added clarification comments to the code.

Thanks,
-- Sergey



[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