clawdie-ai/hooks/pre-push
Operator & Codex 0b27e84924 Mark pre-push hook executable
---
Build: pass | Tests: pass — Tests  2044 passed (2044)
2026-04-29 09:51:51 +02:00

17 lines
406 B
Bash
Executable file

#!/bin/sh
set -eu
# Catch/repair shared git config drift before remote operations.
DOCTOR_STATUS=0
sh scripts/git-doctor.sh --fix || DOCTOR_STATUS=$?
case "$DOCTOR_STATUS" in
0) exit 0 ;;
2)
echo "pre-push: repaired shared git config drift via git-doctor" >&2
exit 0
;;
*)
echo "pre-push: git-doctor reported an unhealed repository problem" >&2
exit "$DOCTOR_STATUS"
;;
esac