From: Patrick Steinhardt Date: Wed, 05 Feb 2025 08:03:32 GMT Subject: Re: [PATCH v5 6/7] parse-options: introduce die_for_incompatible_opt2() Message-ID: In-Reply-To: <20250204-toon-clone-refs-v5-6-37e34af283c8@iotcl.com> On Tue, Feb 04, 2025 at 10:34:05PM +0100, Toon Claes wrote: > diff --git a/builtin/replay.c b/builtin/replay.c > index 1afc6d1ee0cb738fa7fa3f2b5c8ce0dd7802e7da..03d93afd77290ab556565f05bd424956b66ff01c 100644 > --- a/builtin/replay.c > +++ b/builtin/replay.c > @@ -164,7 +164,8 @@ static void determine_replay_mode(struct rev_cmdline_info *cmd_info, > if (!rinfo.positive_refexprs) > die(_("need some commits to replay")); > if (onto_name && *advance_name) > - die(_("--onto and --advance are incompatible")); > + die_for_incompatible_opt2(!!onto_name, "--onto", > + !!*advance_name, "--advance"); The condition isn't needed anymore, is it? As far as I know, `die_for_incompatible_opt*()` handle the condition internally. Patrick