Re: [PATCH 1/2] parse-options: introduce die_for_required_opt()
Hi,
On Wed, Jun 3, 2026 at 9:49 PM Jean-Noël AVILA <jn.avila@free.fr> wrote:
Show 11 quoted lines
> To me, "die_for_required_opt" is a misnomer as the function does not die for
> an existing "required" condition, unlike the other functions such as
> die_for_incompatible_opt<n>.
>
> The names of the parameters do not indicate that the test is not symmetrical
> (not failing on XOR).
>
> Maybe something like "die_for_missing_opt(int tested_opt, const char
> *tested_opt_name, int required_opt, const char *required_opt_name)
>
> would make it more understandable.
Yeah, I agree it's better.
With "dependent_opt" instead of "tested_opt", I think it would be even better.
Thanks.