]> git.ipfire.org Git - thirdparty/git.git/commit
merge: make xopts a strvec
authorJeff King <peff@peff.net>
Thu, 31 Aug 2023 21:17:11 +0000 (17:17 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 31 Aug 2023 22:07:10 +0000 (15:07 -0700)
commitdee02da8264bf7e47c8f2689663fac98d31ee450
tree6dd0682232fd411adfc6e5405d363101b247bc15
parent6e8611e90a629e38da1e7c0e1f986bc6ec23a330
merge: make xopts a strvec

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. This matches the
behavior of revert/cherry-pick, which made the same change in fb60b9f37f
(sequencer: use struct strvec to store merge strategy options,
2023-04-10).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge.c