### Description I have `init.defaultbranch=main` in my git config, and a bunch of tests are failing with `AssertionError: assert 'main' == 'master'`. I haven't looked in detail at these, but it looks like the global config is leaking into the tests. ### Expected behavior Test suite runs the same regardless of the user's configuration. ### pip version main branch ### Python version 3.10 ### OS Windows 11 ### How to Reproduce Run the test suite with `init.defaultbranch=main` in your global git config. About 13 tests fail. ### Output _No response_ ### Code of Conduct - [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).