4a86e95ecf
Without cd, git rev-parse --show-toplevel fails inside .git/ with 'must be run in a work tree', causing init_log_file to write to /logs/post-receive.log (root path), and copy_env_by_branch to fail with 'cannot stat env-example/...'.