Skip to content

Commit 7050624

Browse files
committed
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`
2 parents 4b69f29 + 81e3db4 commit 7050624

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

templates/hooks--pre-commit.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ else
1616
fi
1717

1818
# If you want to allow non-ASCII filenames set this variable to true.
19-
allownonascii=$(git config --bool hooks.allownonascii)
19+
allownonascii=$(git config --type=bool hooks.allownonascii)
2020

2121
# Redirect output to stderr.
2222
exec 1>&2

templates/hooks--update.sample

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
4343
fi
4444

4545
# --- Config
46-
allowunannotated=$(git config --bool hooks.allowunannotated)
47-
allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
48-
denycreatebranch=$(git config --bool hooks.denycreatebranch)
49-
allowdeletetag=$(git config --bool hooks.allowdeletetag)
50-
allowmodifytag=$(git config --bool hooks.allowmodifytag)
46+
allowunannotated=$(git config --type=bool hooks.allowunannotated)
47+
allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
48+
denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
49+
allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
50+
allowmodifytag=$(git config --type=bool hooks.allowmodifytag)
5151

5252
# check for no description
5353
projectdesc=$(sed -e '1q' "$GIT_DIR/description")

0 commit comments

Comments
 (0)