Re: [PATCH 1/8] merge: make xopts a strvec

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

 



On Thu, Aug 31, 2023 at 03:12:30AM -0400, Jeff King wrote:

> The "xopts" variable uses a custom array with ALLOC_GROW(). Using a
> strvec simplifies things a bit. We need fewer variables, and we can also
> ditch our custom parseopt callback in favor of OPT_STRVEC().
> 
> As a bonus, this means that "--no-strategy-option", which was previously
> a silent noop, now does something useful: like other list-like options,
> it will clear the list of -X options seen so far.
> 
> Signed-off-by: Jeff King <peff@xxxxxxxx>
> ---
> I guess you could argue this is a backwards-incompatible change, but the
> existing behavior of --no-strategy-option is so dumb that I can't
> believe somebody would prefer it (plus revert/cherry-pick already use
> OPT_STRVEC for their matching "-X").
> 
> I didn't bother adding a test since we're just re-using OPT_STRVEC code
> that is used elsewhere.

I only noticed the "revert/cherry-pick" thing while sending this patch
out. But it seems that it was changed recently-ish, and Phillip noted
the same behavior change there (along with mentioning merge.c). So now I
doubly feel this is the right thing to do. :)

-Peff



[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