git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git config: clarify bool types
@ 2009-03-17 23:13 Felipe Contreras
  2009-03-18  1:13 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Felipe Contreras @ 2009-03-17 23:13 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin, Junio C Hamano, Felipe Contreras

The value is what it is, the --bool and --bool-or-int options don't
specify the value type, just how it is interpreted. For example: a value
of '1' can be interpreted as 'true'.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---

This applies on top of the 'next' branch.

 builtin-config.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin-config.c b/builtin-config.c
index 1a3baa1..c3a0176 100644
--- a/builtin-config.c
+++ b/builtin-config.c
@@ -66,9 +66,9 @@ static struct option builtin_config_options[] = {
 	OPT_STRING(0, "get-color", &get_color_slot, "slot", "find the color configured: [default]"),
 	OPT_STRING(0, "get-colorbool", &get_colorbool_slot, "slot", "find the color setting: [stdout-is-tty]"),
 	OPT_GROUP("Type"),
-	OPT_BIT(0, "bool", &types, "value is \"true\" or \"false\"", TYPE_BOOL),
+	OPT_BIT(0, "bool", &types, "value is intepreted as bool (\"true\" or \"false\")", TYPE_BOOL),
 	OPT_BIT(0, "int", &types, "value is decimal number", TYPE_INT),
-	OPT_BIT(0, "bool-or-int", &types, "value is --bool or --int", TYPE_BOOL_OR_INT),
+	OPT_BIT(0, "bool-or-int", &types, "value is interpreted either as bool or int", TYPE_BOOL_OR_INT),
 	OPT_GROUP("Other"),
 	OPT_BOOLEAN('z', "null", &end_null, "terminate values with NUL byte"),
 	OPT_END(),
-- 
1.6.2.313.g33352

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] git config: clarify bool types
  2009-03-17 23:13 [PATCH] git config: clarify bool types Felipe Contreras
@ 2009-03-18  1:13 ` Junio C Hamano
  2009-05-06 23:07   ` Felipe Contreras
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2009-03-18  1:13 UTC (permalink / raw)
  To: Felipe Contreras; +Cc: git, Johannes Schindelin

Felipe Contreras <felipe.contreras@gmail.com> writes:

> The value is what it is, the --bool and --bool-or-int options don't
> specify the value type, just how it is interpreted. For example: a value
> of '1' can be interpreted as 'true'.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>
> This applies on top of the 'next' branch.
>
>  builtin-config.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/builtin-config.c b/builtin-config.c
> index 1a3baa1..c3a0176 100644
> --- a/builtin-config.c
> +++ b/builtin-config.c
> @@ -66,9 +66,9 @@ static struct option builtin_config_options[] = {
>  	OPT_STRING(0, "get-color", &get_color_slot, "slot", "find the color configured: [default]"),
>  	OPT_STRING(0, "get-colorbool", &get_colorbool_slot, "slot", "find the color setting: [stdout-is-tty]"),
>  	OPT_GROUP("Type"),
> -	OPT_BIT(0, "bool", &types, "value is \"true\" or \"false\"", TYPE_BOOL),
> +	OPT_BIT(0, "bool", &types, "value is intepreted as bool (\"true\" or \"false\")", TYPE_BOOL),

I'd rater see it say something like:

	Output the value as boolean (true or false)

so that it is consistent with others you can see in the context.
E.g. get-color explains it to order the command to "find the color".

"Interpret" is fine too.  The point is not about the choice of verb but
use of imperative mood.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] git config: clarify bool types
  2009-03-18  1:13 ` Junio C Hamano
@ 2009-05-06 23:07   ` Felipe Contreras
  0 siblings, 0 replies; 4+ messages in thread
From: Felipe Contreras @ 2009-05-06 23:07 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Johannes Schindelin

On Wed, Mar 18, 2009 at 4:13 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> The value is what it is, the --bool and --bool-or-int options don't
>> specify the value type, just how it is interpreted. For example: a value
>> of '1' can be interpreted as 'true'.
>>
>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>> ---
>>
>> This applies on top of the 'next' branch.
>>
>>  builtin-config.c |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/builtin-config.c b/builtin-config.c
>> index 1a3baa1..c3a0176 100644
>> --- a/builtin-config.c
>> +++ b/builtin-config.c
>> @@ -66,9 +66,9 @@ static struct option builtin_config_options[] = {
>>       OPT_STRING(0, "get-color", &get_color_slot, "slot", "find the color configured: [default]"),
>>       OPT_STRING(0, "get-colorbool", &get_colorbool_slot, "slot", "find the color setting: [stdout-is-tty]"),
>>       OPT_GROUP("Type"),
>> -     OPT_BIT(0, "bool", &types, "value is \"true\" or \"false\"", TYPE_BOOL),
>> +     OPT_BIT(0, "bool", &types, "value is intepreted as bool (\"true\" or \"false\")", TYPE_BOOL),
>
> I'd rater see it say something like:
>
>        Output the value as boolean (true or false)
>
> so that it is consistent with others you can see in the context.
> E.g. get-color explains it to order the command to "find the color".
>
> "Interpret" is fine too.  The point is not about the choice of verb but
> use of imperative mood.

-bool is not only used to output values, it's also used to set them,
so it's not related to an action, it's an action modifier, so I don't
think it must be imperative.

I'm going to resend this patch as is.

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] git config: clarify bool types
@ 2009-10-24  8:39 Felipe Contreras
  0 siblings, 0 replies; 4+ messages in thread
From: Felipe Contreras @ 2009-10-24  8:39 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Michael J Gruber, Felipe Contreras

The value is what it is, the --bool and --bool-or-int options don't
specify the value type, just how it is interpreted. For example: a value
of '1' can be interpreted as 'true'.

Comments by Michael J Gruber.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 builtin-config.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin-config.c b/builtin-config.c
index a2d656e..d81928c 100644
--- a/builtin-config.c
+++ b/builtin-config.c
@@ -66,9 +66,9 @@ static struct option builtin_config_options[] = {
 	OPT_STRING(0, "get-color", &get_color_slot, "slot", "find the color configured: [default]"),
 	OPT_STRING(0, "get-colorbool", &get_colorbool_slot, "slot", "find the color setting: [stdout-is-tty]"),
 	OPT_GROUP("Type"),
-	OPT_BIT(0, "bool", &types, "value is \"true\" or \"false\"", TYPE_BOOL),
+	OPT_BIT(0, "bool", &types, "value is interpreted as a boolean (\"true\" or \"false\")", TYPE_BOOL),
 	OPT_BIT(0, "int", &types, "value is decimal number", TYPE_INT),
-	OPT_BIT(0, "bool-or-int", &types, "value is --bool or --int", TYPE_BOOL_OR_INT),
+	OPT_BIT(0, "bool-or-int", &types, "value is interpreted either as --bool or --int", TYPE_BOOL_OR_INT),
 	OPT_GROUP("Other"),
 	OPT_BOOLEAN('z', "null", &end_null, "terminate values with NUL byte"),
 	OPT_END(),
-- 
1.6.5.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-24  8:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-17 23:13 [PATCH] git config: clarify bool types Felipe Contreras
2009-03-18  1:13 ` Junio C Hamano
2009-05-06 23:07   ` Felipe Contreras
2009-10-24  8:39 Felipe Contreras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).