{"thread":{"id":"18362","subject":"[PATCH] git config: clarify bool types","startedAt":"2009-03-17T23:13:51Z","lastAt":"2009-05-06T23:07:10Z","messageCount":3,"participants":["Felipe Contreras","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"108292","messageId":"1237331631-29822-1-git-send-email-felipe.contreras@gmail.com","threadId":"18362","inReplyTo":null,"subject":"[PATCH] git config: clarify bool types","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-03-17T23:13:51Z","receivedAt":"2009-03-17T23:13:51Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"The value is what it is, the --bool and --bool-or-int options don't\nspecify the value type, just how it is interpreted. For example: a value\nof '1' can be interpreted as 'true'.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n\nThis applies on top of the 'next' branch.\n\n builtin-config.c |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin-config.c b/builtin-config.c\nindex 1a3baa1..c3a0176 100644\n--- a/builtin-config.c\n+++ b/builtin-config.c\n@@ -66,9 +66,9 @@ static struct option builtin_config_options[] = {\n \tOPT_STRING(0, \"get-color\", &get_color_slot, \"slot\", \"find the color configured: [default]\"),\n \tOPT_STRING(0, \"get-colorbool\", &get_colorbool_slot, \"slot\", \"find the color setting: [stdout-is-tty]\"),\n \tOPT_GROUP(\"Type\"),\n-\tOPT_BIT(0, \"bool\", &types, \"value is \\\"true\\\" or \\\"false\\\"\", TYPE_BOOL),\n+\tOPT_BIT(0, \"bool\", &types, \"value is intepreted as bool (\\\"true\\\" or \\\"false\\\")\", TYPE_BOOL),\n \tOPT_BIT(0, \"int\", &types, \"value is decimal number\", TYPE_INT),\n-\tOPT_BIT(0, \"bool-or-int\", &types, \"value is --bool or --int\", TYPE_BOOL_OR_INT),\n+\tOPT_BIT(0, \"bool-or-int\", &types, \"value is interpreted either as bool or int\", TYPE_BOOL_OR_INT),\n \tOPT_GROUP(\"Other\"),\n \tOPT_BOOLEAN('z', \"null\", &end_null, \"terminate values with NUL byte\"),\n \tOPT_END(),\n-- \n1.6.2.313.g33352\n"},{"id":"108306","messageId":"7vk56nocpg.fsf@gitster.siamese.dyndns.org","threadId":"18362","inReplyTo":"1237331631-29822-1-git-send-email-felipe.contreras@gmail.com","subject":"Re: [PATCH] git config: clarify bool types","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-18T01:13:15Z","receivedAt":"2009-03-18T01:13:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> The value is what it is, the --bool and --bool-or-int options don't\n> specify the value type, just how it is interpreted. For example: a value\n> of '1' can be interpreted as 'true'.\n>\n> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n> ---\n>\n> This applies on top of the 'next' branch.\n>\n>  builtin-config.c |    4 ++--\n>  1 files changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/builtin-config.c b/builtin-config.c\n> index 1a3baa1..c3a0176 100644\n> --- a/builtin-config.c\n> +++ b/builtin-config.c\n> @@ -66,9 +66,9 @@ static struct option builtin_config_options[] = {\n>  \tOPT_STRING(0, \"get-color\", &get_color_slot, \"slot\", \"find the color configured: [default]\"),\n>  \tOPT_STRING(0, \"get-colorbool\", &get_colorbool_slot, \"slot\", \"find the color setting: [stdout-is-tty]\"),\n>  \tOPT_GROUP(\"Type\"),\n> -\tOPT_BIT(0, \"bool\", &types, \"value is \\\"true\\\" or \\\"false\\\"\", TYPE_BOOL),\n> +\tOPT_BIT(0, \"bool\", &types, \"value is intepreted as bool (\\\"true\\\" or \\\"false\\\")\", TYPE_BOOL),\n\nI'd rater see it say something like:\n\n\tOutput the value as boolean (true or false)\n\nso that it is consistent with others you can see in the context.\nE.g. get-color explains it to order the command to \"find the color\".\n\n\"Interpret\" is fine too.  The point is not about the choice of verb but\nuse of imperative mood.\n"},{"id":"113145","messageId":"94a0d4530905061607s14c700e5t4b87166772c75622@mail.gmail.com","threadId":"18362","inReplyTo":"7vk56nocpg.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] git config: clarify bool types","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-05-06T23:07:10Z","receivedAt":"2009-05-06T23:07:10Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Wed, Mar 18, 2009 at 4:13 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>\n>> The value is what it is, the --bool and --bool-or-int options don't\n>> specify the value type, just how it is interpreted. For example: a value\n>> of '1' can be interpreted as 'true'.\n>>\n>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n>> ---\n>>\n>> This applies on top of the 'next' branch.\n>>\n>>  builtin-config.c |    4 ++--\n>>  1 files changed, 2 insertions(+), 2 deletions(-)\n>>\n>> diff --git a/builtin-config.c b/builtin-config.c\n>> index 1a3baa1..c3a0176 100644\n>> --- a/builtin-config.c\n>> +++ b/builtin-config.c\n>> @@ -66,9 +66,9 @@ static struct option builtin_config_options[] = {\n>>       OPT_STRING(0, \"get-color\", &get_color_slot, \"slot\", \"find the color configured: [default]\"),\n>>       OPT_STRING(0, \"get-colorbool\", &get_colorbool_slot, \"slot\", \"find the color setting: [stdout-is-tty]\"),\n>>       OPT_GROUP(\"Type\"),\n>> -     OPT_BIT(0, \"bool\", &types, \"value is \\\"true\\\" or \\\"false\\\"\", TYPE_BOOL),\n>> +     OPT_BIT(0, \"bool\", &types, \"value is intepreted as bool (\\\"true\\\" or \\\"false\\\")\", TYPE_BOOL),\n>\n> I'd rater see it say something like:\n>\n>        Output the value as boolean (true or false)\n>\n> so that it is consistent with others you can see in the context.\n> E.g. get-color explains it to order the command to \"find the color\".\n>\n> \"Interpret\" is fine too.  The point is not about the choice of verb but\n> use of imperative mood.\n\n-bool is not only used to output values, it's also used to set them,\nso it's not related to an action, it's an action modifier, so I don't\nthink it must be imperative.\n\nI'm going to resend this patch as is.\n\n-- \nFelipe Contreras\n"}]}