Re: [PATCH v3 1/5] parse-options: Allow PARSE_OPT_NOARG in integer arguments

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ramkumar Ramachandra
Date: Friday, August 20, 2010 - 1:01 pm

Hi Junio,

Junio C Hamano writes:

Oh, does it mean that? I might have interpreted the description in
`parse-options.h` too literally: "says that this option takes no
argument". So I'm handling the case when an integer option is
specified, but no integer argument is given.


That case is already handled. The condition (opt->flags & PARSE_OPT_OPTARG &&
!p->opt) does the same thing.


Okay, let me explain. Let's say I want to have an option that takes an
integer argument, say `foo`. To set it to the integer argument 42, I
can say `--foo=42`. To set it to its default value, I could earlier
say `--foo=`. With this patch I can simply say `--foo`. Makes sense?

-- Ram
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v3 0/5] fmt-merge-msg improvements, Ramkumar Ramachandra, (Fri Aug 20, 12:14 pm)
[PATCH v3 2/5] fmt-merge-msg: Make the number of log entri ..., Ramkumar Ramachandra, (Fri Aug 20, 12:14 pm)
[PATCH v3 3/5] fmt-merge-msg: Update command line options ..., Ramkumar Ramachandra, (Fri Aug 20, 12:15 pm)
[PATCH v3 4/5] fmt-merge-msg: Remove deprecated --summary ..., Ramkumar Ramachandra, (Fri Aug 20, 12:15 pm)
[PATCH v3 5/5] fmt-merge-msg: Update fmt-merge-msg and mer ..., Ramkumar Ramachandra, (Fri Aug 20, 12:15 pm)
Re: [PATCH v3 1/5] parse-options: Allow PARSE_OPT_NOARG in ..., Ramkumar Ramachandra, (Fri Aug 20, 1:01 pm)
Re: [PATCH v3 4/5] fmt-merge-msg: Remove deprecated --summ ..., Ramkumar Ramachandra, (Fri Aug 20, 10:49 pm)
Re: [PATCH v3 3/5] fmt-merge-msg: Update command line opti ..., Ramkumar Ramachandra, (Fri Aug 20, 10:51 pm)
Re: [PATCH v3 2/5] fmt-merge-msg: Make the number of log e ..., Ramkumar Ramachandra, (Fri Aug 20, 10:55 pm)