#!/usr/bin/env bash
# github-guard hook: prepare-commit-msg
#
# Fires:    After the default commit message is prepared, before the editor opens.
# Use for:  Injecting templates, ticket IDs, or trailers into the message.
# Blocking: yes (non-zero aborts) — but mainly edits the message file
#
# Dispatcher: runs every executable script in  .githooks/prepare-commit-msg.d/  in lexical
# order. Add behaviour by dropping a guard script there; remove it by deleting
# the file (or `chmod -x`). No prepare-commit-msg.d/ (or an empty one) = no-op. Managed by
# github-guard — edit guards in the .d/ dir, not this file.
d=$(cd "$(dirname "$0")" && pwd)
exec "$d/lib/run-guards.sh" "$(basename "$0")" "$@"
