Jeff King writes:
> The way it is written, I think the intent is that you would do:
>
> OPT_ARGUMENT("foo", &saw_foo, ...),
> OPT_ARGUMENT("no-foo", &saw_no_foo, ...),
>
> I'm happy to punt on it until it ever comes up (which I suspect may be
> never).
Yeah, having to have one extra element
On Mon, Mar 18, 2019 at 11:47:20AM +0900, Junio C Hamano wrote:
> Jeff King writes:
>
> >> +`OPT_ARGUMENT(long, &int_var, description)`::
> >>Introduce a long-option argument that will be kept in `argv[]`.
> >> + If this option was seen, `int_var` will be set to one (except
> >> + if a `NU
Jeff King writes:
>> +`OPT_ARGUMENT(long, &int_var, description)`::
>> Introduce a long-option argument that will be kept in `argv[]`.
>> +If this option was seen, `int_var` will be set to one (except
>> +if a `NULL` pointer was passed).
>
> So this effectively makes it into a "bool"
Hi Peff,
On Thu, 14 Mar 2019, Jeff King wrote:
> On Thu, Mar 14, 2019 at 04:25:04AM -0700, Johannes Schindelin via
> GitGitGadget wrote:
>
> > diff --git a/Documentation/technical/api-parse-options.txt
> > b/Documentation/technical/api-parse-options.txt
> > index 2b036d7838..2e2e7c10c6 100644
On Thu, Mar 14, 2019 at 04:25:04AM -0700, Johannes Schindelin via GitGitGadget
wrote:
> diff --git a/Documentation/technical/api-parse-options.txt
> b/Documentation/technical/api-parse-options.txt
> index 2b036d7838..2e2e7c10c6 100644
> --- a/Documentation/technical/api-parse-options.txt
> +++ b
From: Johannes Schindelin
`OPT_ARGUMENT()` is intended to keep the specified long option in `argv`
and not to do anything else.
However, it would make a lot of sense for the caller to know whether
this option was seen at all or not. For example, we want to teach `git
difftool` to work outside of
6 matches
Mail list logo