Re: [PATCH v5 6/7] parse-options: introduce die_for_incompatible_opt2()

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

 



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




[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