#!/usr/bin/env bash
# github-guard hook: pre-merge-commit
#
# Fires:    Before a merge commit is created (a non-fast-forward `git merge`/`git pull`).
# Use for:  Refusing merge commits or running extra merge checks.
# Blocking: yes (non-zero aborts the merge commit)
#
# Dispatcher: runs every executable script in  .githooks/pre-merge-commit.d/  in lexical
# order. Add behaviour by dropping a guard script there; remove it by deleting
# the file (or `chmod -x`). No pre-merge-commit.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")" "$@"
