if [[ "$*" == *"commit"* ]] && [[ "$*" == *"--no-verify"* ]]; then
echo "❌ ERROR: --no-verify is forbidden by team policy"
echo ""
echo "All commits must pass pre-commit hooks for quality enforcement."
echo "If you have a genuine emergency that requires bypassing:"
echo " 1. Create a GitHub issue explaining the situation"
echo " 2. Get explicit team approval"
echo " 3. Use the system git directly: /usr/bin/git"
echo ""
echo "See CLAUDE.md section 'Code Quality Enforcement' for details."
exit 1
fi
if [ -n "$IN_NIX_SHELL" ]; then
NIX_GIT=$(which -a git 2>/dev/null | grep -E '^/nix/store' | head -n1)
if [ -n "$NIX_GIT" ]; then
exec "$NIX_GIT" "$@"
fi
fi
exec /usr/bin/git "$@"