This has been wonky before (eg: 'git add foo; git commit' would work
while 'git commit foo' would not), but between 2.40.1 and 2.42.0
something about git changed such that the pre-commit completely stopped
working.
So now we properly clean the tests' git invocations' environment.