summaryrefslogtreecommitdiff
path: root/misc/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'misc/hooks')
-rwxr-xr-xmisc/hooks/pre-commit-black16
-rwxr-xr-xmisc/hooks/pre-commit-clang-format18
2 files changed, 17 insertions, 17 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..e8e62e6470 100755
--- a/misc/hooks/pre-commit-clang-format
+++ b/misc/hooks/pre-commit-clang-format
@@ -77,7 +77,7 @@ fi
# To get consistent formatting, we recommend contributors to use the same
# clang-format version as CI.
RECOMMENDED_CLANG_FORMAT_MAJOR_MIN="12"
-RECOMMENDED_CLANG_FORMAT_MAJOR_MAX="13"
+RECOMMENDED_CLANG_FORMAT_MAJOR_MAX="14"
if [ ! -x "$CLANG_FORMAT" ] ; then
message="Error: clang-format executable not found. Please install clang-format $RECOMMENDED_CLANG_FORMAT_MAJOR_MAX."
@@ -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"