#!/usr/bin/env bash # sh-cherrypick prepare-commit-msg: PRIMARY reject backstop for a raw `git cherry-pick`. # # This (not commit-msg) is the hook that fires on a CLEAN cherry-pick auto-commit. Git runs # prepare-commit-msg + post-commit on a clean pick but SKIPS pre-commit/commit-msg; commit-msg # only fires on the `git commit`-backed path (`--continue`, normal commits). So the hard-block # for known-reject picks lives here to cover clean picks too. # # Fail-safe: the only non-zero exit is the deliberate reject block; normal commits are no-ops. set -uo pipefail # shellcheck source=_reject_guard.sh . "$(dirname "$0")/_reject_guard.sh" sh_cherrypick_reject_guard "${1:-}" || exit 1 exit 0