From: "Lucius Hu via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Lucius Hu <orctarorga@gmail.com>, Lucius Hu <orctarorga@gmail.com>
Subject: [PATCH] templates: fix deprecated type option `--bool`
Date: Sun, 19 Jan 2020 22:53:32 +0000 [thread overview]
Message-ID: <pull.522.git.1579474412847.gitgitgadget@gmail.com> (raw)
From: Lucius Hu <orctarorga@gmail.com>
The `--bool` option to `git-config` is marked as historical, and users are
recommended to use `--type=bool` instead. This commit replaces all occurrences
of `--bool` in the templates.
Also note that, no other deprecated type options are found, including `--int`,
`--bool-or-int`, `--path`, or `--expiry-date`.
Signed-off-by: Lucius Hu <orctarorga@gmail.com>
---
templates: Fix depracated type option --bool
The --bool option to git-config is marked as historical, and users are
recommended to use --type=bool instead. This commit replaces all
occurrences of --bool in the templates.
Also note that, no other depracated type options are found, including
--int,--bool-or-int, --path, or --expiry-date.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-522%2Flebensterben%2Fmaster-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-522/lebensterben/master-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/522
templates/hooks--pre-commit.sample | 2 +-
templates/hooks--update.sample | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/templates/hooks--pre-commit.sample b/templates/hooks--pre-commit.sample
index 6a75641638..e144712c85 100755
--- a/templates/hooks--pre-commit.sample
+++ b/templates/hooks--pre-commit.sample
@@ -16,7 +16,7 @@ else
fi
# If you want to allow non-ASCII filenames set this variable to true.
-allownonascii=$(git config --bool hooks.allownonascii)
+allownonascii=$(git config --type=bool hooks.allownonascii)
# Redirect output to stderr.
exec 1>&2
diff --git a/templates/hooks--update.sample b/templates/hooks--update.sample
index 80ba94135c..5014c4b31c 100755
--- a/templates/hooks--update.sample
+++ b/templates/hooks--update.sample
@@ -43,11 +43,11 @@ if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
fi
# --- Config
-allowunannotated=$(git config --bool hooks.allowunannotated)
-allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
-denycreatebranch=$(git config --bool hooks.denycreatebranch)
-allowdeletetag=$(git config --bool hooks.allowdeletetag)
-allowmodifytag=$(git config --bool hooks.allowmodifytag)
+allowunannotated=$(git config --type=bool hooks.allowunannotated)
+allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
+denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
+allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
+allowmodifytag=$(git config --type=bool hooks.allowmodifytag)
# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
base-commit: 7a6a90c6ec48fc78c83d7090d6c1b95d8f3739c0
--
gitgitgadget
next reply other threads:[~2020-01-19 22:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-19 22:53 Lucius Hu via GitGitGadget [this message]
2020-01-24 18:12 ` [PATCH] templates: fix deprecated type option `--bool` 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=pull.522.git.1579474412847.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=orctarorga@gmail.com \
/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.
Code repositories for project(s) associated with this public 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).