* Use relative path with `--cd` in generated hook script
Use a relative path with `--cd` in the generated hook script to avoid switching to the original worktree.
Also, unset `GIT_DIR` in the hook script so git doesn’t treat the current directory (after the cd) as the git root.
* Fix snapshots
* Add tests