{"thread":{"id":"52664","subject":"[PATCH] templates: fix deprecated type option `--bool`","startedAt":"2020-01-19T22:53:38Z","lastAt":"2020-01-24T18:12:51Z","messageCount":2,"participants":["Lucius Hu via GitGitGadget","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"390068","messageId":"pull.522.git.1579474412847.gitgitgadget@gmail.com","threadId":"52664","inReplyTo":null,"subject":"[PATCH] templates: fix deprecated type option `--bool`","fromName":"Lucius Hu via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-01-19T22:53:32Z","receivedAt":"2020-01-19T22:53:38Z","isPatch":true,"sender":{"key":"name:Lucius Hu","avatar":null},"body":"From: Lucius Hu <orctarorga@gmail.com>\n\nThe `--bool` option to `git-config` is marked as historical, and users are\nrecommended to use `--type=bool` instead. This commit replaces all occurrences\nof `--bool` in the templates.\n\nAlso note that, no other deprecated type options are found, including `--int`,\n`--bool-or-int`, `--path`, or `--expiry-date`.\n\nSigned-off-by: Lucius Hu <orctarorga@gmail.com>\n---\n    templates: Fix depracated type option --bool\n    \n    The --bool option to git-config is marked as historical, and users are\n    recommended to use --type=bool instead. This commit replaces all\n    occurrences of --bool in the templates.\n    \n    Also note that, no other depracated type options are found, including \n    --int,--bool-or-int, --path, or --expiry-date.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-522%2Flebensterben%2Fmaster-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-522/lebensterben/master-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/522\n\n templates/hooks--pre-commit.sample |  2 +-\n templates/hooks--update.sample     | 10 +++++-----\n 2 files changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/templates/hooks--pre-commit.sample b/templates/hooks--pre-commit.sample\nindex 6a75641638..e144712c85 100755\n--- a/templates/hooks--pre-commit.sample\n+++ b/templates/hooks--pre-commit.sample\n@@ -16,7 +16,7 @@ else\n fi\n \n # If you want to allow non-ASCII filenames set this variable to true.\n-allownonascii=$(git config --bool hooks.allownonascii)\n+allownonascii=$(git config --type=bool hooks.allownonascii)\n \n # Redirect output to stderr.\n exec 1>&2\ndiff --git a/templates/hooks--update.sample b/templates/hooks--update.sample\nindex 80ba94135c..5014c4b31c 100755\n--- a/templates/hooks--update.sample\n+++ b/templates/hooks--update.sample\n@@ -43,11 +43,11 @@ if [ -z \"$refname\" -o -z \"$oldrev\" -o -z \"$newrev\" ]; then\n fi\n \n # --- Config\n-allowunannotated=$(git config --bool hooks.allowunannotated)\n-allowdeletebranch=$(git config --bool hooks.allowdeletebranch)\n-denycreatebranch=$(git config --bool hooks.denycreatebranch)\n-allowdeletetag=$(git config --bool hooks.allowdeletetag)\n-allowmodifytag=$(git config --bool hooks.allowmodifytag)\n+allowunannotated=$(git config --type=bool hooks.allowunannotated)\n+allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)\n+denycreatebranch=$(git config --type=bool hooks.denycreatebranch)\n+allowdeletetag=$(git config --type=bool hooks.allowdeletetag)\n+allowmodifytag=$(git config --type=bool hooks.allowmodifytag)\n \n # check for no description\n projectdesc=$(sed -e '1q' \"$GIT_DIR/description\")\n\nbase-commit: 7a6a90c6ec48fc78c83d7090d6c1b95d8f3739c0\n-- \ngitgitgadget\n"},{"id":"390374","messageId":"xmqqo8us206e.fsf@gitster-ct.c.googlers.com","threadId":"52664","inReplyTo":"pull.522.git.1579474412847.gitgitgadget@gmail.com","subject":"Re: [PATCH] templates: fix deprecated type option `--bool`","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-01-24T18:12:41Z","receivedAt":"2020-01-24T18:12:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Lucius Hu via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Lucius Hu <orctarorga@gmail.com>\n>\n> The `--bool` option to `git-config` is marked as historical, and users are\n> recommended to use `--type=bool` instead. This commit replaces all occurrences\n> of `--bool` in the templates.\n>\n> Also note that, no other deprecated type options are found, including `--int`,\n> `--bool-or-int`, `--path`, or `--expiry-date`.\n>\n> Signed-off-by: Lucius Hu <orctarorga@gmail.com>\n> ---\n>     templates: Fix depracated type option --bool\n>     \n>     The --bool option to git-config is marked as historical, and users are\n>     recommended to use --type=bool instead. This commit replaces all\n>     occurrences of --bool in the templates.\n>     \n>     Also note that, no other depracated type options are found, including \n>     --int,--bool-or-int, --path, or --expiry-date.\n\nThat's a bit redundant but I suspect it is not Lucius's fault ;-)\n\n>  # If you want to allow non-ASCII filenames set this variable to true.\n> -allownonascii=$(git config --bool hooks.allownonascii)\n> +allownonascii=$(git config --type=bool hooks.allownonascii)\n>  \n>  # Redirect output to stderr.\n>  exec 1>&2\n> diff --git a/templates/hooks--update.sample b/templates/hooks--update.sample\n> index 80ba94135c..5014c4b31c 100755\n> --- a/templates/hooks--update.sample\n> +++ b/templates/hooks--update.sample\n> @@ -43,11 +43,11 @@ if [ -z \"$refname\" -o -z \"$oldrev\" -o -z \"$newrev\" ]; then\n>  fi\n>  \n>  # --- Config\n> -allowunannotated=$(git config --bool hooks.allowunannotated)\n> -allowdeletebranch=$(git config --bool hooks.allowdeletebranch)\n> -denycreatebranch=$(git config --bool hooks.denycreatebranch)\n> -allowdeletetag=$(git config --bool hooks.allowdeletetag)\n> -allowmodifytag=$(git config --bool hooks.allowmodifytag)\n> +allowunannotated=$(git config --type=bool hooks.allowunannotated)\n> +allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)\n> +denycreatebranch=$(git config --type=bool hooks.denycreatebranch)\n> +allowdeletetag=$(git config --type=bool hooks.allowdeletetag)\n> +allowmodifytag=$(git config --type=bool hooks.allowmodifytag)\n\nOK.\n\n>  # check for no description\n>  projectdesc=$(sed -e '1q' \"$GIT_DIR/description\")\n>\n> base-commit: 7a6a90c6ec48fc78c83d7090d6c1b95d8f3739c0\n\nOfftopic.  This is probably what GGG added, but can we hide it\nbehind the \"-- \" marker?\n"}]}