summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-01-30 22:17:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-01-30 22:17:11 (GMT)
commit7050624abceb6f7b4ca0ca7ddfce5831f8a40b8f (patch)
tree4530fc75ea5a006b83e55adb1951a033e377187b /templates
parent4b69f2927165521df85cea1b90b982074d93c9ec (diff)
parent81e3db42f3212a8e441e4ecee9a2928921cb9045 (diff)
downloadgit-7050624abceb6f7b4ca0ca7ddfce5831f8a40b8f.zip
git-7050624abceb6f7b4ca0ca7ddfce5831f8a40b8f.tar.gz
git-7050624abceb6f7b4ca0ca7ddfce5831f8a40b8f.tar.bz2
Merge branch 'lh/bool-to-type-bool'
Replace "git config --bool" calls with "git config --type=bool" in sample templates. * lh/bool-to-type-bool: templates: fix deprecated type option `--bool`
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/hooks--pre-commit.sample2
-rwxr-xr-xtemplates/hooks--update.sample10
2 files changed, 6 insertions, 6 deletions
diff --git a/templates/hooks--pre-commit.sample b/templates/hooks--pre-commit.sample
index 6a75641..e144712 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 80ba941..5014c4b 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")