summaryrefslogtreecommitdiff
path: root/misc/hooks
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-02-10 12:00:11 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-02-10 12:30:19 +0100
commit1bdb82c64e65f23381183051ef1fc9856a7830f8 (patch)
tree82f8a101fb4461d29bc9dd1e2bc147bb99c706f6 /misc/hooks
parentf21a62b62027a88ea90de539a48df8e280a820e8 (diff)
Fix typos with codespell
Using codespell 2.2-dev from current git. Added `misc/scripts/codespell.sh` to make it easier to run it once in a while and update the skip and ignore lists.
Diffstat (limited to 'misc/hooks')
-rwxr-xr-xmisc/hooks/pre-commit-black16
-rwxr-xr-xmisc/hooks/pre-commit-clang-format16
2 files changed, 16 insertions, 16 deletions
diff --git a/misc/hooks/pre-commit-black b/misc/hooks/pre-commit-black
index 8e22e6068e..fd93bfe73c 100755
--- a/misc/hooks/pre-commit-black
+++ b/misc/hooks/pre-commit-black
@@ -139,11 +139,11 @@ fi
while true; do
if [ $terminal = "0" ] ; then
if [ -x "$ZENITY" ] ; then
- ans=$($ZENITY --text-info --filename="$patch" --width=800 --height=600 --title="Do you want to apply that patch?" --ok-label="Apply" --cancel-label="Do not apply" --extra-button="Apply and stage")
+ choice=$($ZENITY --text-info --filename="$patch" --width=800 --height=600 --title="Do you want to apply that patch?" --ok-label="Apply" --cancel-label="Do not apply" --extra-button="Apply and stage")
if [ "$?" = "0" ] ; then
yn="Y"
else
- if [ "$ans" = "Apply and stage" ] ; then
+ if [ "$choice" = "Apply and stage" ] ; then
yn="S"
else
yn="N"
@@ -151,10 +151,10 @@ while true; do
fi
elif [ -x "$XMSG" ] ; then
$XMSG -file "$patch" -buttons "Apply":100,"Apply and stage":200,"Do not apply":0 -center -default "Do not apply" -geometry 800x600 -title "Do you want to apply that patch?"
- ans=$?
- if [ "$ans" = "100" ] ; then
+ choice=$?
+ if [ "$choice" = "100" ] ; then
yn="Y"
- elif [ "$ans" = "200" ] ; then
+ elif [ "$choice" = "200" ] ; then
yn="S"
else
yn="N"
@@ -162,10 +162,10 @@ while true; do
elif [ \( \( "$OSTYPE" = "msys" \) -o \( "$OSTYPE" = "win32" \) \) -a \( -x "$PWSH" \) ]; then
winmessage="$(canonicalize_filename "./.git/hooks/winmessage.ps1")"
$PWSH -noprofile -executionpolicy bypass -file "$winmessage" -file "$patch" -buttons "Apply":100,"Apply and stage":200,"Do not apply":0 -center -default "Do not apply" -geometry 800x600 -title "Do you want to apply that patch?"
- ans=$?
- if [ "$ans" = "100" ] ; then
+ choice=$?
+ if [ "$choice" = "100" ] ; then
yn="Y"
- elif [ "$ans" = "200" ] ; then
+ elif [ "$choice" = "200" ] ; then
yn="S"
else
yn="N"
diff --git a/misc/hooks/pre-commit-clang-format b/misc/hooks/pre-commit-clang-format
index de5d9c3f06..2ee3f569d5 100755
--- a/misc/hooks/pre-commit-clang-format
+++ b/misc/hooks/pre-commit-clang-format
@@ -179,11 +179,11 @@ fi
while true; do
if [ $terminal = "0" ] ; then
if [ -x "$ZENITY" ] ; then
- ans=$($ZENITY --text-info --filename="$patch" --width=800 --height=600 --title="Do you want to apply that patch?" --ok-label="Apply" --cancel-label="Do not apply" --extra-button="Apply and stage")
+ choice=$($ZENITY --text-info --filename="$patch" --width=800 --height=600 --title="Do you want to apply that patch?" --ok-label="Apply" --cancel-label="Do not apply" --extra-button="Apply and stage")
if [ "$?" = "0" ] ; then
yn="Y"
else
- if [ "$ans" = "Apply and stage" ] ; then
+ if [ "$choice" = "Apply and stage" ] ; then
yn="S"
else
yn="N"
@@ -191,10 +191,10 @@ while true; do
fi
elif [ -x "$XMSG" ] ; then
$XMSG -file "$patch" -buttons "Apply":100,"Apply and stage":200,"Do not apply":0 -center -default "Do not apply" -geometry 800x600 -title "Do you want to apply that patch?"
- ans=$?
- if [ "$ans" = "100" ] ; then
+ choice=$?
+ if [ "$choice" = "100" ] ; then
yn="Y"
- elif [ "$ans" = "200" ] ; then
+ elif [ "$choice" = "200" ] ; then
yn="S"
else
yn="N"
@@ -202,10 +202,10 @@ while true; do
elif [ \( \( "$OSTYPE" = "msys" \) -o \( "$OSTYPE" = "win32" \) \) -a \( -x "$PWSH" \) ]; then
winmessage="$(canonicalize_filename "./.git/hooks/winmessage.ps1")"
$PWSH -noprofile -executionpolicy bypass -file "$winmessage" -file "$patch" -buttons "Apply":100,"Apply and stage":200,"Do not apply":0 -center -default "Do not apply" -geometry 800x600 -title "Do you want to apply that patch?"
- ans=$?
- if [ "$ans" = "100" ] ; then
+ choice=$?
+ if [ "$choice" = "100" ] ; then
yn="Y"
- elif [ "$ans" = "200" ] ; then
+ elif [ "$choice" = "200" ] ; then
yn="S"
else
yn="N"