git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Ivan Shapovalov <intelfx@intelfx.name>
Subject: Re: [PATCH] doc: centrally document various ways spell `true` and `false`
Date: Wed, 12 Mar 2025 18:17:12 -0400	[thread overview]
Message-ID: <Z9IH6G7BnM0blOmH@nand.local> (raw)
In-Reply-To: <xmqqy0ycz9dk.fsf@gitster.g>

On Tue, Feb 11, 2025 at 09:20:07AM -0800, Junio C Hamano wrote:
>  Cc'ed Taylor, as the author of fb0dc3ba (builtin/config.c: support
>  `--type=<type>` as preferred alias for `--<type>`, 2018-04-18) this
>  patch butchers.

Wow, this is a blast from the past. I think this was one of my first
contributions to Git, and indeed:

    $ git log --oneline --author=Taylor.Blau --until=2018-04-18 | wc -l
    9

>  Documentation/git-config.txt     | 4 +++-
>  Documentation/git.txt            | 5 +++--
>  Documentation/pretty-formats.txt | 8 ++++----
>  3 files changed, 10 insertions(+), 7 deletions(-)
>
> diff --git c/Documentation/git-config.txt w/Documentation/git-config.txt
> index 3e420177c1..76042581ec 100644
> --- c/Documentation/git-config.txt
> +++ w/Documentation/git-config.txt
> @@ -213,7 +213,9 @@ See also <<FILES>>.
>  +
>  Valid `<type>`'s include:
>  +
> -- 'bool': canonicalize values as either "true" or "false".
> +- 'bool': canonicalize values `true`, `yes`,`on`, and positive
> +  numbers as "true", and values `false`, `no`, `off` and `0` as
> +  "false".

I agree with the rest of the patch, but is this true (no pun intended
;-))? I thought that we might canonicalize "yes" to "yes" if the value
we are asking about is already something other than a literal "true" or
"false", but I don't think we do:

    $ git.compile -c foo.bar=yes config --type=bool foo.bar
    true

So I do think that it is worth saying "you can spell 'true' as 'yes',
'1', ..." in the documentation, but I don't think that it is correct
that we'll canonicalize "yes" to "true" in the case described here.

Sorry that this took me so long to respond to. I think I must have
missed it when you wrote it and I only noticed it today while cleaning
up old emails.

Thanks,
Taylor

  parent reply	other threads:[~2025-03-12 22:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-11 17:20 [PATCH] doc: centrally document various ways spell `true` and `false` Junio C Hamano
2025-02-11 17:42 ` Eric Sunshine
2025-02-11 18:11   ` Junio C Hamano
2025-03-12 22:17 ` Taylor Blau [this message]
2025-03-13 12:26   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z9IH6G7BnM0blOmH@nand.local \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=intelfx@intelfx.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).