mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-22 00:48:09 +01:00
Make Git hooks work on worktrees on Windows
(cherry picked from commit 4bf03afe8b70062cfca3336527294171e538ce25)
This commit is contained in:
parent
a6a5b60235
commit
866f38a8ae
@ -70,7 +70,7 @@ if [ ! -x "$BLACK" ] ; then
|
|||||||
$XMSG -center -title "Error" "Error: black executable not found."
|
$XMSG -center -title "Error" "Error: black executable not found."
|
||||||
exit 1
|
exit 1
|
||||||
elif [ \( \( "$OSTYPE" = "msys" \) -o \( "$OSTYPE" = "win32" \) \) -a \( -x "$PWSH" \) ]; then
|
elif [ \( \( "$OSTYPE" = "msys" \) -o \( "$OSTYPE" = "win32" \) \) -a \( -x "$PWSH" \) ]; then
|
||||||
winmessage="$(canonicalize_filename "./.git/hooks/winmessage.ps1")"
|
winmessage="$(canonicalize_filename "$(dirname -- "$0")/winmessage.ps1")"
|
||||||
$PWSH -noprofile -executionpolicy bypass -file "$winmessage" -center -title "Error" --text "Error: black executable not found."
|
$PWSH -noprofile -executionpolicy bypass -file "$winmessage" -center -title "Error" --text "Error: black executable not found."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -160,7 +160,7 @@ while true; do
|
|||||||
yn="N"
|
yn="N"
|
||||||
fi
|
fi
|
||||||
elif [ \( \( "$OSTYPE" = "msys" \) -o \( "$OSTYPE" = "win32" \) \) -a \( -x "$PWSH" \) ]; then
|
elif [ \( \( "$OSTYPE" = "msys" \) -o \( "$OSTYPE" = "win32" \) \) -a \( -x "$PWSH" \) ]; then
|
||||||
winmessage="$(canonicalize_filename "./.git/hooks/winmessage.ps1")"
|
winmessage="$(canonicalize_filename "$(dirname -- "$0")/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?"
|
$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?"
|
||||||
choice=$?
|
choice=$?
|
||||||
if [ "$choice" = "100" ] ; then
|
if [ "$choice" = "100" ] ; then
|
||||||
|
@ -90,7 +90,7 @@ if [ ! -x "$CLANG_FORMAT" ] ; then
|
|||||||
$XMSG -center -title "Error" "$message"
|
$XMSG -center -title "Error" "$message"
|
||||||
exit 1
|
exit 1
|
||||||
elif [ \( \( "$OSTYPE" = "msys" \) -o \( "$OSTYPE" = "win32" \) \) -a \( -x "$PWSH" \) ]; then
|
elif [ \( \( "$OSTYPE" = "msys" \) -o \( "$OSTYPE" = "win32" \) \) -a \( -x "$PWSH" \) ]; then
|
||||||
winmessage="$(canonicalize_filename "./.git/hooks/winmessage.ps1")"
|
winmessage="$(canonicalize_filename "$(dirname -- "$0")/winmessage.ps1")"
|
||||||
$PWSH -noprofile -executionpolicy bypass -file "$winmessage" -center -title "Error" --text "$message"
|
$PWSH -noprofile -executionpolicy bypass -file "$winmessage" -center -title "Error" --text "$message"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -200,7 +200,7 @@ while true; do
|
|||||||
yn="N"
|
yn="N"
|
||||||
fi
|
fi
|
||||||
elif [ \( \( "$OSTYPE" = "msys" \) -o \( "$OSTYPE" = "win32" \) \) -a \( -x "$PWSH" \) ]; then
|
elif [ \( \( "$OSTYPE" = "msys" \) -o \( "$OSTYPE" = "win32" \) \) -a \( -x "$PWSH" \) ]; then
|
||||||
winmessage="$(canonicalize_filename "./.git/hooks/winmessage.ps1")"
|
winmessage="$(canonicalize_filename "$(dirname -- "$0")/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?"
|
$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?"
|
||||||
choice=$?
|
choice=$?
|
||||||
if [ "$choice" = "100" ] ; then
|
if [ "$choice" = "100" ] ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user