git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, "Lin Sun" <lin.sun@zoom.us>,
	"Đoàn Trần Công Danh" <congdanhqx@gmail.com>,
	"David Aguilar" <davvid@gmail.com>
Subject: Re: [PATCH 3/5] git-config: document --bool-or-str and --type=bool-or-str
Date: Thu, 08 Apr 2021 11:22:56 -0700	[thread overview]
Message-ID: <xmqqeefktz3z.fsf@gitster.g> (raw)
In-Reply-To: <patch-3.6-8aa59b3118-20210408T133125Z-avarab@gmail.com> (=?utf-8?B?IsOGdmFyCUFybmZqw7Zyw7A=?= Bjarmason"'s message of "Thu, 8 Apr 2021 15:34:27 +0200")

Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> Document the new "bool-or-str" facility added in
> dbd8c09bfe (mergetool: allow auto-merge for meld to follow the
> vim-diff behavior, 2020-05-07).
>
> Unfortunately that commit also added a --bool-or-str option, even
> though we've preferred to deprecate that form ever since
> fb0dc3bac1 (builtin/config.c: support `--type=<type>` as preferred
> alias for `--<type>`, 2018-04-18).
>
> Since we've got it already let's document it along with the preferred
> --type=* form, and change our own code to use the --type=bool-or-str
> form over --bool-or-str.

It was a mistake to introduce a new option that is immediately
deprecated X-<.

Thanks for spotting and correcting.

>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
>  Documentation/git-config.txt | 3 +++
>  mergetools/meld              | 2 +-
>  2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
> index 4b4cc5c5e8..4ae9ef210c 100644
> --- a/Documentation/git-config.txt
> +++ b/Documentation/git-config.txt
> @@ -187,6 +187,8 @@ Valid `<type>`'s include:
>    1073741824 upon input.
>  - 'bool-or-int': canonicalize according to either 'bool' or 'int', as described
>    above.
> +- 'bool-or-str: canonicalize according to either 'bool' (as described
> +  above), or emit the value as-is.
>  - 'path': canonicalize by adding a leading `~` to the value of `$HOME` and
>    `~user` to the home directory for the specified user. This specifier has no
>    effect when setting the value (but you can use `git config section.variable
> @@ -202,6 +204,7 @@ Valid `<type>`'s include:
>  --bool::
>  --int::
>  --bool-or-int::
> +--bool-or-str::
>  --path::
>  --expiry-date::
>    Historical options for selecting a type specifier. Prefer instead `--type`
> diff --git a/mergetools/meld b/mergetools/meld
> index aab4ebb935..8386e0574e 100644
> --- a/mergetools/meld
> +++ b/mergetools/meld
> @@ -59,7 +59,7 @@ check_meld_for_features () {
>  	if test -z "$meld_use_auto_merge_option"
>  	then
>  		meld_use_auto_merge_option=$(
> -			git config --bool-or-str mergetool.meld.useAutoMerge
> +			git config --type=bool-or-str mergetool.meld.useAutoMerge
>  		)
>  		case "$meld_use_auto_merge_option" in
>  		true | false)

  reply	other threads:[~2021-04-08 18:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 13:34 [PATCH 0/5] config: support --type=bool-or-auto for "tristate" parsing Ævar Arnfjörð Bjarmason
2021-04-08 13:34 ` [PATCH 1/5] config.c: add a comment about why value=NULL is true Ævar Arnfjörð Bjarmason
2021-04-08 18:10   ` Junio C Hamano
2021-04-08 13:34 ` [PATCH 2/5] config tests: test for --bool-or-str Ævar Arnfjörð Bjarmason
2021-04-08 18:21   ` Junio C Hamano
2021-04-08 23:11     ` Ævar Arnfjörð Bjarmason
2021-04-08 13:34 ` [PATCH 3/5] git-config: document --bool-or-str and --type=bool-or-str Ævar Arnfjörð Bjarmason
2021-04-08 18:22   ` Junio C Hamano [this message]
2021-04-08 13:34 ` [PATCH 4/5] config.c: add a "tristate" helper Ævar Arnfjörð Bjarmason
2021-04-08 18:33   ` Junio C Hamano
2021-04-08 23:23     ` Ævar Arnfjörð Bjarmason
2021-04-08 23:51       ` Junio C Hamano
2021-04-09  1:33         ` Ævar Arnfjörð Bjarmason
2021-04-09 12:53           ` Junio C Hamano
2021-04-08 23:54       ` Junio C Hamano
2021-04-09 20:05     ` Jeff King
2021-04-09 22:11       ` Junio C Hamano
2021-04-10  1:23         ` Jeff King
2021-04-10  1:43           ` Junio C Hamano
2021-04-08 13:34 ` [PATCH 5/5] config: add --type=bool-or-auto switch Ævar Arnfjörð Bjarmason
2021-04-08 18:36   ` 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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqeefktz3z.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=congdanhqx@gmail.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=lin.sun@zoom.us \
    --subject='Re: [PATCH 3/5] git-config: document --bool-or-str and --type=bool-or-str' \
    /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

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).