From e424e716f881a1bf1f6813402af79fbd80416a70 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Sun, 9 Jun 2024 12:15:09 +1000 Subject: [PATCH] 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 --- Dist/git_hook_shims/commit-msg | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Dist/git_hook_shims/commit-msg b/Dist/git_hook_shims/commit-msg index 943f0ed582..7f5548da50 100755 --- a/Dist/git_hook_shims/commit-msg +++ b/Dist/git_hook_shims/commit-msg @@ -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 $?