From 8daea8242c20fde289ecebc1a963ad927c468587 Mon Sep 17 00:00:00 2001 From: Christopher Albert Date: Tue, 10 Nov 2026 08:09:15 +0100 Subject: [PATCH 1/2] Let a checkout opt out of the fo build check A Fortran subproject that configures only inside its superbuild (SIESTA in Stellarator-Tools) cannot pass a standalone build; hooks.foCheck=false skips fo for that checkout, like hooks.repoPreCommit for repository configs. --- scripts/setup/pre-commit | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/setup/pre-commit b/scripts/setup/pre-commit index 0f3b22d..1bd570e 100755 --- a/scripts/setup/pre-commit +++ b/scripts/setup/pre-commit @@ -39,7 +39,11 @@ elif git cat-file -e :CMakeLists.txt 2>/dev/null; then fortran=true fi fi -if $fortran; then +# A subproject that only builds inside its superbuild (SIESTA in Stellarator-Tools) +# cannot pass a standalone build check; such checkouts opt out. +if $fortran && [[ "$(git config --bool hooks.foCheck || true)" == false ]]; then + echo 'hooks.foCheck=false: fo build/test pre-commit checks skipped' >&2 +elif $fortran; then if ! command -v fo >/dev/null; then echo 'fo not found: build/test pre-commit checks skipped; install: https://github.com/lazy-fortran/fo' >&2 elif ! fo hook --help 2>/dev/null | grep -q 'fo hook pre-commit'; then From 2e3c4553de998637ed058ebf27e9dbacfbe950c8 Mon Sep 17 00:00:00 2001 From: Christopher Albert Date: Tue, 10 Nov 2026 08:09:32 +0100 Subject: [PATCH 2/2] Update the hook checksum in the colleague installer --- scripts/setup/git-hooks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup/git-hooks.sh b/scripts/setup/git-hooks.sh index 10a9fff..c1a10d6 100755 --- a/scripts/setup/git-hooks.sh +++ b/scripts/setup/git-hooks.sh @@ -10,7 +10,7 @@ for tool in git python3 curl install mktemp; do done revision=632eff5452fe5c828bc0fb0224c992534567c776 checker_sha256=56561f64c2054899da968d96f0676e4ae10a00f72e3920f0f69cb5e594cf8af5 -hook_sha256=ef024b5c725de166cbb64e7894d57b60e164443c92cfa315c14b0f74dce28e4a +hook_sha256=effe43885a5f5b4fe67d3bfe15de208406552e60facaf35f8aa3c145f19b7b10 dest="$HOME/.local/share/git-hooks" if [[ "${1:-}" == --dry-run ]]; then printf 'Would install global repository hygiene %s at %s\n' "$revision" "$dest"