{"thread":{"id":"35994","subject":"[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","startedAt":"2014-02-28T14:29:25Z","lastAt":"2014-02-28T23:50:02Z","messageCount":6,"participants":["Sun He","孙赫","Duy Nguyen","Junio C Hamano","He Sun"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"235616","messageId":"1393597765-14164-1-git-send-email-sunheehnus@gmail.com","threadId":"35994","inReplyTo":null,"subject":"[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","fromName":"Sun He","fromEmail":"sunheehnus@gmail.com","sentAt":"2014-02-28T14:29:25Z","receivedAt":"2014-02-28T14:29:25Z","isPatch":true,"sender":{"key":"sunheehnus@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2889804?v=4"},"body":"Signed-off-by: Sun He <sunheehnus@gmail.com>\n---\n parse-options.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/parse-options.c b/parse-options.c\nindex 7b8d3fa..59a52b0 100644\n--- a/parse-options.c\n+++ b/parse-options.c\n@@ -371,7 +371,7 @@ static void parse_options_check(const struct option *opts)\n \t\tcase OPTION_NEGBIT:\n \t\tcase OPTION_SET_INT:\n \t\tcase OPTION_SET_PTR:\n-\t\tcase OPTION_NUMBER:\n+\t\tcase OPTION_CMDMODE:\n \t\t\tif ((opts->flags & PARSE_OPT_OPTARG) ||\n \t\t\t    !(opts->flags & PARSE_OPT_NOARG))\n \t\t\t\terr |= optbug(opts, \"should not accept an argument\");\n-- \n1.9.0.138.g2de3478.dirty\n---\nI came across this protential bug.\nAccording to parse-options.h OPTION_CMDMODE is an option with noarguments and OPTION_NUMBER is special type option.\n\nThanks,\nHe Sun\n"},{"id":"235618","messageId":"CAJr59C1qHrQ9qPdDWfGzj9QX3L-EwEcP+updu0SDn24r4i7UMQ@mail.gmail.com","threadId":"35994","inReplyTo":"1393597765-14164-1-git-send-email-sunheehnus@gmail.com","subject":"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","fromName":"孙赫","fromEmail":"sunheehnus@gmail.com","sentAt":"2014-02-28T14:32:52Z","receivedAt":"2014-02-28T14:32:52Z","isPatch":true,"sender":{"key":"sunheehnus@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2889804?v=4"},"body":"I am not sure if this is a bug.\nI need your help to find out it.\n\nCheers,\nHe Sun\n\n2014-02-28 22:29 GMT+08:00 Sun He <sunheehnus@gmail.com>:\n> Signed-off-by: Sun He <sunheehnus@gmail.com>\n> ---\n>  parse-options.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/parse-options.c b/parse-options.c\n> index 7b8d3fa..59a52b0 100644\n> --- a/parse-options.c\n> +++ b/parse-options.c\n> @@ -371,7 +371,7 @@ static void parse_options_check(const struct option *opts)\n>                 case OPTION_NEGBIT:\n>                 case OPTION_SET_INT:\n>                 case OPTION_SET_PTR:\n> -               case OPTION_NUMBER:\n> +               case OPTION_CMDMODE:\n>                         if ((opts->flags & PARSE_OPT_OPTARG) ||\n>                             !(opts->flags & PARSE_OPT_NOARG))\n>                                 err |= optbug(opts, \"should not accept an argument\");\n> --\n> 1.9.0.138.g2de3478.dirty\n> ---\n> I came across this protential bug.\n> According to parse-options.h OPTION_CMDMODE is an option with noarguments and OPTION_NUMBER is special type option.\n>\n> Thanks,\n> He Sun\n"},{"id":"235620","messageId":"CACsJy8BM=m6=tv2P6F3EAcVPupovSTKC3s+5gkus3V+GZ4owRw@mail.gmail.com","threadId":"35994","inReplyTo":"CAJr59C1qHrQ9qPdDWfGzj9QX3L-EwEcP+updu0SDn24r4i7UMQ@mail.gmail.com","subject":"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","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2014-02-28T14:42:21Z","receivedAt":"2014-02-28T14:42:21Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Way too long subject line. Keep it within 70-75 chars. The rest could\nbe put in the body.\n\nOn Fri, Feb 28, 2014 at 9:32 PM, 孙赫 <sunheehnus@gmail.com> wrote:\n> I am not sure if this is a bug.\n> I need your help to find out it.\n\nTip:git has a wonderful history (most of it anyway). Try \"git log\n--patch parse-options.[ch]\" to understand parse-options evolution. Add\n-SOPTION_NUMBER (or -SOPTION_CMDMODE) to limit to only commits whose\ndiff contains that keyword.\n-- \nDuy\n"},{"id":"235625","messageId":"CAJr59C2Rd4JDUe-UMcjg6=z2fVDc45pSHZwKB_aA-X2p1PkQvw@mail.gmail.com","threadId":"35994","inReplyTo":"CACsJy8BM=m6=tv2P6F3EAcVPupovSTKC3s+5gkus3V+GZ4owRw@mail.gmail.com","subject":"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","fromName":"孙赫","fromEmail":"sunheehnus@gmail.com","sentAt":"2014-02-28T15:21:21Z","receivedAt":"2014-02-28T15:21:21Z","isPatch":true,"sender":{"key":"sunheehnus@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2889804?v=4"},"body":"2014-02-28 22:43 GMT+08:00 Duy Nguyen [via git]\n<ml-node+s661346n7604517h28@n2.nabble.com>:\n> Way too long subject line. Keep it within 70-75 chars. The rest could\n> be put in the body.\n>\n> On Fri, Feb 28, 2014 at 9:32 PM, 孙赫 <[hidden email]> wrote:\n>> I am not sure if this is a bug.\n>> I need your help to find out it.\n>\n> Tip:git has a wonderful history (most of it anyway). Try \"git log\n> --patch parse-options.[ch]\" to understand parse-options evolution. Add\n> -SOPTION_NUMBER (or -SOPTION_CMDMODE) to limit to only commits whose\n> diff contains that keyword.\n> --\n> Duy\n> --\nGot it,\nThanks\n\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to [hidden email]\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n>\n> ________________________________\n> If you reply to this email, your message will be added to the discussion\n> below:\n> 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\n> To start a new topic under git, email\n> ml-node+s661346n661346h27@n2.nabble.com\n> To unsubscribe from git, click here.\n> NAML\n"},{"id":"235663","messageId":"xmqqsir3t39f.fsf@gitster.dls.corp.google.com","threadId":"35994","inReplyTo":"CACsJy8BM=m6=tv2P6F3EAcVPupovSTKC3s+5gkus3V+GZ4owRw@mail.gmail.com","subject":"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","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-02-28T20:02:04Z","receivedAt":"2014-02-28T20:02:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Duy Nguyen <pclouds@gmail.com> writes:\n\n> Way too long subject line. Keep it within 70-75 chars. The rest could\n> be put in the body.\n>\n> On Fri, Feb 28, 2014 at 9:32 PM, 孙赫 <sunheehnus@gmail.com> wrote:\n>> I am not sure if this is a bug.\n>> I need your help to find out it.\n>\n> Tip:git has a wonderful history (most of it anyway). Try \"git log\n> --patch parse-options.[ch]\" to understand parse-options evolution. Add\n> -SOPTION_NUMBER (or -SOPTION_CMDMODE) to limit to only commits whose\n> diff contains that keyword.\n\nAlso, I do not think this should be done in a single patch.  What if\nit turns out that explicitly making sure that CMDMODE does not take\nany argument is a good idea, but the other change is a bad one?\n"},{"id":"235681","messageId":"CAJr59C097u0HK5RqmZj6rUTAgeoSMjpoCJR_NGHiot02tQHDMg@mail.gmail.com","threadId":"35994","inReplyTo":"xmqqsir3t39f.fsf@gitster.dls.corp.google.com","subject":"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","fromName":"He Sun","fromEmail":"sunheehnus@gmail.com","sentAt":"2014-02-28T23:50:02Z","receivedAt":"2014-02-28T23:50:02Z","isPatch":true,"sender":{"key":"sunheehnus@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2889804?v=4"},"body":"2014-03-01 4:02 GMT+08:00 Junio C Hamano [via git]\n<ml-node+s661346n7604560h61@n2.nabble.com>:\n> Duy Nguyen <[hidden email]> writes:\n>\n>> Way too long subject line. Keep it within 70-75 chars. The rest could\n>> be put in the body.\n>>\n>> On Fri, Feb 28, 2014 at 9:32 PM, 孙赫 <[hidden email]> wrote:\n>>> I am not sure if this is a bug.\n>>> I need your help to find out it.\n>>\n>> Tip:git has a wonderful history (most of it anyway). Try \"git log\n>> --patch parse-options.[ch]\" to understand parse-options evolution. Add\n>> -SOPTION_NUMBER (or -SOPTION_CMDMODE) to limit to only commits whose\n>> diff contains that keyword.\n>\n> Also, I do not think this should be done in a single patch.  What if\n> it turns out that explicitly making sure that CMDMODE does not take\n> any argument is a good idea, but the other change is a bad one?\n\nOK, I will try to figure it out.\n\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to [hidden email]\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n>\n> ________________________________\n> If you reply to this email, your message will be added to the discussion\n> below:\n> 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\n> To start a new topic under git, email\n> ml-node+s661346n661346h27@n2.nabble.com\n> To unsubscribe from git, click here.\n> NAML\n"}]}