@matheusbsbs / matheus-bagliano / commits / 81e3db42f3
Fork 0

templates: fix deprecated 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 deprecated type options are found, including `--int`, `--bool-or-int`, `--path`, or `--expiry-date`. Signed-off-by: Lucius Hu <orctarorga@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Lucius Hu committed Jan 19, 2020 at 22:53 UTC 81e3db42f3212a8e441e4ecee9a2928921cb9045
2 files changed +6 -6
templates/hooks--pre-commit.sample
+1 -1
@@ -16,7 +16,7 @@ else
16 fi
17
18 # 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)
20
21 # Redirect output to stderr.
22 exec 1>&2
templates/hooks--update.sample
+5 -5
@@ -43,11 +43,11 @@ if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
43 fi
44
45 # --- 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)
51
52 # check for no description
53 projectdesc=$(sed -e '1q' "$GIT_DIR/description")