-
Untracked WIP directories (e.g. unfinished frontend/) were triggering HAS_FRONTEND=1 via bare `[ -d frontend ]`, causing the pre-push gate to lint/build code that isn't part of the push. Require non-empty `git ls-files -- <dir>` so detection follows tracked content, matching the CLAUDE.md rule that the gate covers current module + completed modules only.
-
让 git pre-push 钩子触发的子 shell 也能拿到正确的 JDK21 路径与 mysql-client 路径,避免在 PATH 短的环境下编译/连库失败。
-
2