From 7be41a3e96815a35781e21c7f539e464ad7a1a8a Mon Sep 17 00:00:00 2001 From: Mark Ridgwell Date: Fri, 19 Jun 2026 16:20:36 +0100 Subject: [PATCH 1/5] feat: delegate buildcheck and buildtest to global hooks when available If git config --global core.hooksPath is set and the hooks directory contains a matching executable script, exec it in place of the local implementation so a machine-wide installation takes precedence. Prompt: hey, buildcheck and buildtest... if the global pre-commit exists and has those scripts we should delegate to them rather than running out own Closes #696 --- development/buildcheck | 6 ++++++ development/buildtest | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/development/buildcheck b/development/buildcheck index b87bab24..122ce5b4 100755 --- a/development/buildcheck +++ b/development/buildcheck @@ -25,6 +25,12 @@ info() { fi } +GLOBAL_HOOKS=$(git config --global core.hooksPath 2>/dev/null) +SCRIPT_NAME=$(basename "$0") +if [ -n "$GLOBAL_HOOKS" ] && [ -x "$GLOBAL_HOOKS/$SCRIPT_NAME" ]; then + exec "$GLOBAL_HOOKS/$SCRIPT_NAME" "$@" +fi + SOLUTION=$(find "$PWD" -type f -iname "*.sln" | head -1) [ -z "$SOLUTION" ] && SOLUTION=$(find "$PWD" -type f -iname "*.slnx" | head -1) [ -z "$SOLUTION" ] && die "No Solution found in $(pwd)" diff --git a/development/buildtest b/development/buildtest index f1b51d5c..26f273da 100755 --- a/development/buildtest +++ b/development/buildtest @@ -27,6 +27,12 @@ info() { BASEDIR=$(dirname "$(readlink -f "$0")") +GLOBAL_HOOKS=$(git config --global core.hooksPath 2>/dev/null) +SCRIPT_NAME=$(basename "$0") +if [ -n "$GLOBAL_HOOKS" ] && [ -x "$GLOBAL_HOOKS/$SCRIPT_NAME" ]; then + exec "$GLOBAL_HOOKS/$SCRIPT_NAME" "$@" +fi + RULESET_ADJUSTMENT_FILE= TEST_BENCHMARKS= TEST_INTEGRATION= From e1ee93c34edde369e6024dae8a6c5110a89b204c Mon Sep 17 00:00:00 2001 From: Mark Ridgwell Date: Fri, 19 Jun 2026 16:36:54 +0100 Subject: [PATCH 2/5] feat: also check system git hooks path for delegation Also checks git config --system core.hooksPath when the global hooks path does not contain the script, matching git's own config precedence (global before system). Prompt: can it pick the system git config --system and pick that path if it does too Closes #696 --- development/buildcheck | 6 +++++- development/buildtest | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/development/buildcheck b/development/buildcheck index 122ce5b4..35efbd04 100755 --- a/development/buildcheck +++ b/development/buildcheck @@ -25,11 +25,15 @@ info() { fi } -GLOBAL_HOOKS=$(git config --global core.hooksPath 2>/dev/null) SCRIPT_NAME=$(basename "$0") +GLOBAL_HOOKS=$(git config --global core.hooksPath 2>/dev/null) if [ -n "$GLOBAL_HOOKS" ] && [ -x "$GLOBAL_HOOKS/$SCRIPT_NAME" ]; then exec "$GLOBAL_HOOKS/$SCRIPT_NAME" "$@" fi +SYSTEM_HOOKS=$(git config --system core.hooksPath 2>/dev/null) +if [ -n "$SYSTEM_HOOKS" ] && [ -x "$SYSTEM_HOOKS/$SCRIPT_NAME" ]; then + exec "$SYSTEM_HOOKS/$SCRIPT_NAME" "$@" +fi SOLUTION=$(find "$PWD" -type f -iname "*.sln" | head -1) [ -z "$SOLUTION" ] && SOLUTION=$(find "$PWD" -type f -iname "*.slnx" | head -1) diff --git a/development/buildtest b/development/buildtest index 26f273da..918a1c30 100755 --- a/development/buildtest +++ b/development/buildtest @@ -27,11 +27,15 @@ info() { BASEDIR=$(dirname "$(readlink -f "$0")") -GLOBAL_HOOKS=$(git config --global core.hooksPath 2>/dev/null) SCRIPT_NAME=$(basename "$0") +GLOBAL_HOOKS=$(git config --global core.hooksPath 2>/dev/null) if [ -n "$GLOBAL_HOOKS" ] && [ -x "$GLOBAL_HOOKS/$SCRIPT_NAME" ]; then exec "$GLOBAL_HOOKS/$SCRIPT_NAME" "$@" fi +SYSTEM_HOOKS=$(git config --system core.hooksPath 2>/dev/null) +if [ -n "$SYSTEM_HOOKS" ] && [ -x "$SYSTEM_HOOKS/$SCRIPT_NAME" ]; then + exec "$SYSTEM_HOOKS/$SCRIPT_NAME" "$@" +fi RULESET_ADJUSTMENT_FILE= TEST_BENCHMARKS= From 23b8614904d8bc4b571620541c00dac69548502e Mon Sep 17 00:00:00 2001 From: Mark Ridgwell Date: Fri, 19 Jun 2026 16:38:50 +0100 Subject: [PATCH 3/5] feat: add info lines indicating which script source is being used Prints the resolved path when delegating to global or system hooks, or "Using local