Files
Toyota-AVC-LAN/.githooks/pre-commit
T
2026-07-06 16:53:13 -07:00

12 lines
530 B
Bash
Executable File

#!/usr/bin/env bash
# Pre-commit: keep the C++ Device/Action enums in sync with the Lua dissector
# (scripts/sync_avclan_enums.py in its default lint + drift-check mode). A
# non-zero exit blocks the commit; fix with `scripts/sync_avclan_enums.py --fix`.
#
# Installed by the top-level CMake configure step, which points core.hooksPath
# at this directory. Bypass a single commit with `git commit --no-verify`.
set -euo pipefail
repo_root="$(git rev-parse --show-toplevel)"
exec python3 "$repo_root/scripts/sync_avclan_enums.py"