feat(hooks): one-command install-hooks.sh (worktree-safe) #170

Merged
clawdie merged 2 commits from fix/wiki-format-drift into main 2026-06-24 14:17:28 +02:00

2 commits

Author SHA1 Message Date
9f091454e5 fix(hooks): make install-hooks robust for worktrees/custom git dirs
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
CI / port (pull_request) Has been cancelled
CI / agent-jail-pkgs (pull_request) Has been cancelled
The installer symlinked a RELATIVE target (../../scripts/pre-push), which only
resolves for a standard <repo>/.git/hooks layout — it breaks in git worktrees
or when .git is a file/elsewhere (both used by the agent harness), and assumed
.git/hooks already exists.

Resolve the real hooks dir via 'git rev-parse --git-path hooks' (worktree-safe),
mkdir -p it, and symlink to the ABSOLUTE source path so it works regardless of
where the hooks dir lives. Also verify pre-push exists + is executable.

Tested: installs, link resolves to scripts/pre-push, idempotent.
2026-06-24 14:13:06 +02:00
c111de0f3d feat(hooks): install-hooks.sh — one-command hook activation 2026-06-24 14:09:59 +02:00