d5ddb3f97f
When git invokes post-receive, cwd is GIT_DIR (not worktree root). `git rev-parse --show-toplevel` refuses to run from a bare context, so the script would silently cd into .git/. Use `--absolute-git-dir` and its parent to find the worktree reliably. Also: receive.denyCurrentBranch=false means push does NOT auto-update the worktree, so the hook must do `git reset --hard HEAD` to sync the source the build will use.