Drop Batch impl. of Git hook (shim) as it's apparently not used

see ffa5bb9b7
this should now work in Git BASH as well
and it wasn't all for nothing, at least now I have reference for a
polyglot if the need arises
This commit is contained in:
YoshiRulz 2024-06-09 12:15:09 +10:00
parent f0bc8fbd2e
commit e424e716f8
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 2 additions and 11 deletions

View File

@ -1,12 +1,3 @@
@{a="\"} >$null # " 2>/dev/null || true #" >NUL 2>&1 || TYPE NUL & ECHO OFF
echo \" <<'BATCH_SCRIPT' >/dev/null ">NUL "\"
dotnet pwsh .\Dist\git_hooks\commit-msg.ps1 %*
GOTO :eof
BATCH_SCRIPT
# else this is BASH
# heredoc trick for polyglot taken from https://github.com/llamasoft/polyshell#how-it-works -- this script is basically that sans PowerShell support (since that's not the shell on Windows)
# improved Batch `ECHO OFF` taken from https://github.com/tingstad/polyscript#explanation
#!/bin/sh
set -e
dotnet pwsh "./Dist/git_hooks/$(basename "$0").ps1" "$@"
exit $?