Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(git): strip GIT environs when running git
When running an npm command from within a git environment, such as installing or testing during a git rebase or bisect, these environment variables will be passed to the child process, causing it to fetch/checkout/etc in the root project instead of doing what the user intends. Strip them out so that they are not passed to the child process. Also, remove git environs from the test environment, so that spawning git in a test to set up a dummy repo doesn't mess with the main project's git repository. This enables adding `exec npm test` in a `git rebase -i` list to run tests between commits.
- Loading branch information