* [PATCH] OPTION_CMDMODE should be used when not accept an argument, and OPTION_NUMBER is of special type. So change the mode to OPTION_CMDMODE
@ 2014-02-28 14:29 Sun He
2014-02-28 14:32 ` 孙赫
0 siblings, 1 reply; 6+ messages in thread
From: Sun He @ 2014-02-28 14:29 UTC (permalink / raw)
To: git; +Cc: mhagger, Sun He
Signed-off-by: Sun He <sunheehnus@gmail.com>
---
parse-options.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/parse-options.c b/parse-options.c
index 7b8d3fa..59a52b0 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -371,7 +371,7 @@ static void parse_options_check(const struct option *opts)
case OPTION_NEGBIT:
case OPTION_SET_INT:
case OPTION_SET_PTR:
- case OPTION_NUMBER:
+ case OPTION_CMDMODE:
if ((opts->flags & PARSE_OPT_OPTARG) ||
!(opts->flags & PARSE_OPT_NOARG))
err |= optbug(opts, "should not accept an argument");
--
1.9.0.138.g2de3478.dirty
---
I came across this protential bug.
According to parse-options.h OPTION_CMDMODE is an option with noarguments and OPTION_NUMBER is special type option.
Thanks,
He Sun
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] OPTION_CMDMODE should be used when not accept an argument, and OPTION_NUMBER is of special type. So change the mode to OPTION_CMDMODE
2014-02-28 14:29 [PATCH] OPTION_CMDMODE should be used when not accept an argument, and OPTION_NUMBER is of special type. So change the mode to OPTION_CMDMODE Sun He
@ 2014-02-28 14:32 ` 孙赫
2014-02-28 14:42 ` Duy Nguyen
0 siblings, 1 reply; 6+ messages in thread
From: 孙赫 @ 2014-02-28 14:32 UTC (permalink / raw)
To: git; +Cc: Michael Haggerty, Sun He
I am not sure if this is a bug.
I need your help to find out it.
Cheers,
He Sun
2014-02-28 22:29 GMT+08:00 Sun He <sunheehnus@gmail.com>:
> Signed-off-by: Sun He <sunheehnus@gmail.com>
> ---
> parse-options.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/parse-options.c b/parse-options.c
> index 7b8d3fa..59a52b0 100644
> --- a/parse-options.c
> +++ b/parse-options.c
> @@ -371,7 +371,7 @@ static void parse_options_check(const struct option *opts)
> case OPTION_NEGBIT:
> case OPTION_SET_INT:
> case OPTION_SET_PTR:
> - case OPTION_NUMBER:
> + case OPTION_CMDMODE:
> if ((opts->flags & PARSE_OPT_OPTARG) ||
> !(opts->flags & PARSE_OPT_NOARG))
> err |= optbug(opts, "should not accept an argument");
> --
> 1.9.0.138.g2de3478.dirty
> ---
> I came across this protential bug.
> According to parse-options.h OPTION_CMDMODE is an option with noarguments and OPTION_NUMBER is special type option.
>
> Thanks,
> He Sun
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] OPTION_CMDMODE should be used when not accept an argument, and OPTION_NUMBER is of special type. So change the mode to OPTION_CMDMODE
2014-02-28 14:32 ` 孙赫
@ 2014-02-28 14:42 ` Duy Nguyen
2014-02-28 15:21 ` 孙赫
2014-02-28 20:02 ` Junio C Hamano
0 siblings, 2 replies; 6+ messages in thread
From: Duy Nguyen @ 2014-02-28 14:42 UTC (permalink / raw)
To: 孙赫; +Cc: git, Michael Haggerty
Way too long subject line. Keep it within 70-75 chars. The rest could
be put in the body.
On Fri, Feb 28, 2014 at 9:32 PM, 孙赫 <sunheehnus@gmail.com> wrote:
> I am not sure if this is a bug.
> I need your help to find out it.
Tip:git has a wonderful history (most of it anyway). Try "git log
--patch parse-options.[ch]" to understand parse-options evolution. Add
-SOPTION_NUMBER (or -SOPTION_CMDMODE) to limit to only commits whose
diff contains that keyword.
--
Duy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] OPTION_CMDMODE should be used when not accept an argument, and OPTION_NUMBER is of special type. So change the mode to OPTION_CMDMODE
2014-02-28 14:42 ` Duy Nguyen
@ 2014-02-28 15:21 ` 孙赫
2014-02-28 20:02 ` Junio C Hamano
1 sibling, 0 replies; 6+ messages in thread
From: 孙赫 @ 2014-02-28 15:21 UTC (permalink / raw)
To: pclouds, git
2014-02-28 22:43 GMT+08:00 Duy Nguyen [via git]
<ml-node+s661346n7604517h28@n2.nabble.com>:
> Way too long subject line. Keep it within 70-75 chars. The rest could
> be put in the body.
>
> On Fri, Feb 28, 2014 at 9:32 PM, 孙赫 <[hidden email]> wrote:
>> I am not sure if this is a bug.
>> I need your help to find out it.
>
> Tip:git has a wonderful history (most of it anyway). Try "git log
> --patch parse-options.[ch]" to understand parse-options evolution. Add
> -SOPTION_NUMBER (or -SOPTION_CMDMODE) to limit to only commits whose
> diff contains that keyword.
> --
> Duy
> --
Got it,
Thanks
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to [hidden email]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://git.661346.n2.nabble.com/PATCH-OPTION-CMDMODE-should-be-used-when-not-accept-an-argument-and-OPTION-NUMBER-is-of-special-typeE-tp7604513p7604517.html
> To start a new topic under git, email
> ml-node+s661346n661346h27@n2.nabble.com
> To unsubscribe from git, click here.
> NAML
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] OPTION_CMDMODE should be used when not accept an argument, and OPTION_NUMBER is of special type. So change the mode to OPTION_CMDMODE
2014-02-28 14:42 ` Duy Nguyen
2014-02-28 15:21 ` 孙赫
@ 2014-02-28 20:02 ` Junio C Hamano
2014-02-28 23:50 ` He Sun
1 sibling, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2014-02-28 20:02 UTC (permalink / raw)
To: Duy Nguyen; +Cc: 孙赫, git, Michael Haggerty
Duy Nguyen <pclouds@gmail.com> writes:
> Way too long subject line. Keep it within 70-75 chars. The rest could
> be put in the body.
>
> On Fri, Feb 28, 2014 at 9:32 PM, 孙赫 <sunheehnus@gmail.com> wrote:
>> I am not sure if this is a bug.
>> I need your help to find out it.
>
> Tip:git has a wonderful history (most of it anyway). Try "git log
> --patch parse-options.[ch]" to understand parse-options evolution. Add
> -SOPTION_NUMBER (or -SOPTION_CMDMODE) to limit to only commits whose
> diff contains that keyword.
Also, I do not think this should be done in a single patch. What if
it turns out that explicitly making sure that CMDMODE does not take
any argument is a good idea, but the other change is a bad one?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] OPTION_CMDMODE should be used when not accept an argument, and OPTION_NUMBER is of special type. So change the mode to OPTION_CMDMODE
2014-02-28 20:02 ` Junio C Hamano
@ 2014-02-28 23:50 ` He Sun
0 siblings, 0 replies; 6+ messages in thread
From: He Sun @ 2014-02-28 23:50 UTC (permalink / raw)
To: Junio C Hamano, git
2014-03-01 4:02 GMT+08:00 Junio C Hamano [via git]
<ml-node+s661346n7604560h61@n2.nabble.com>:
> Duy Nguyen <[hidden email]> writes:
>
>> Way too long subject line. Keep it within 70-75 chars. The rest could
>> be put in the body.
>>
>> On Fri, Feb 28, 2014 at 9:32 PM, 孙赫 <[hidden email]> wrote:
>>> I am not sure if this is a bug.
>>> I need your help to find out it.
>>
>> Tip:git has a wonderful history (most of it anyway). Try "git log
>> --patch parse-options.[ch]" to understand parse-options evolution. Add
>> -SOPTION_NUMBER (or -SOPTION_CMDMODE) to limit to only commits whose
>> diff contains that keyword.
>
> Also, I do not think this should be done in a single patch. What if
> it turns out that explicitly making sure that CMDMODE does not take
> any argument is a good idea, but the other change is a bad one?
OK, I will try to figure it out.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to [hidden email]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://git.661346.n2.nabble.com/PATCH-OPTION-CMDMODE-should-be-used-when-not-accept-an-argument-and-OPTION-NUMBER-is-of-special-typeE-tp7604513p7604560.html
> To start a new topic under git, email
> ml-node+s661346n661346h27@n2.nabble.com
> To unsubscribe from git, click here.
> NAML
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-28 23:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-28 14:29 [PATCH] OPTION_CMDMODE should be used when not accept an argument, and OPTION_NUMBER is of special type. So change the mode to OPTION_CMDMODE Sun He
2014-02-28 14:32 ` 孙赫
2014-02-28 14:42 ` Duy Nguyen
2014-02-28 15:21 ` 孙赫
2014-02-28 20:02 ` Junio C Hamano
2014-02-28 23:50 ` He Sun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox