From: Junio C Hamano Date: Mon, 13 Oct 2025 19:54:03 GMT Subject: Re: [PATCH v3 1/3] replay: use die_for_incompatible_opt2() for option validation Message-ID: In-Reply-To: <20251013182530.33041-2-siddharthasthana31@gmail.com> Siddharth Asthana writes: > - if (advance_name_opt && contained) > - die(_("options '%s' and '%s' cannot be used together"), > - "--advance", "--contained"); > + die_for_incompatible_opt2(!!advance_name_opt, "--advance", > + contained, "--contained"); OK. die_for_incompatible_optN() takes "int" for values of individual options, so "turn this into Boolean" operator "!!" is used for advance_name_opt that is a character pointer, but contained is already an integer, so you do not use it there. Makes sense. Even though the resulting code may look slightly strange, there is nothing wrong here. > advance_name = xstrdup_or_null(advance_name_opt); > > repo_init_revisions(repo, &revs, prefix);