twosigma / git-meta

Repository for the git-meta project -- build your own monorepo using Git submodules
http://twosigma.github.io/git-meta
BSD 3-Clause "New" or "Revised" License
216 stars 50 forks source link

Fix hook chdir race #836

Closed novalis closed 2 years ago

novalis commented 2 years ago

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.