Resumed pretender project; pretender-hay (P1 native
pre-commit hook generator) was next
Core implementation already existed:
install_pre_commit_hook /
uninstall_pre_commit_hook in main.rs, shim
using --staged (from completed
pretender-a80)
Ran Rule-of-5-Universal review; found one HIGH issue:
install silently overwrote foreign hooks (asymmetric with
uninstall's safety check)
Fixes applied:
install_pre_commit_hook: added existence + marker
check; refuses to overwrite foreign hooks with clear error
pre_commit_hook_contents(): refactored from
&'static str to String built from
PRE_COMMIT_HOOK_MARKER constant — marker and shim content
now definitionally linked, cannot drift
Shebang updated to #!/usr/bin/env sh for
portability
Init interactive test assertion tightened to verify
--staged flag