Instead of running chdir in the parent process before running the
hooks, pass the cwd arg to spawn. This eliminates a race condition
where perhaps one chdir happens, and then a different submodule's
chdir happens, and then the first submodule's hooks get run out of the
second submodule.
Instead of running chdir in the parent process before running the hooks, pass the cwd arg to spawn. This eliminates a race condition where perhaps one chdir happens, and then a different submodule's chdir happens, and then the first submodule's hooks get run out of the second submodule.