Add a special case for git config discovery inside tests
Add a special case for git config discovery inside tests

Fixes #7469: Some tests will fail if one have a local git config user.name/user.email

tsurai/cargo,rustyhorde/cargo,vojtechkral/cargo,nipunn1313/cargo,eminence/cargo,tshepang/cargo,eminence/cargo,tsurai/cargo,rust-lang/cargo,eminence/cargo,rust-lang/cargo,tshepang/cargo,tsurai/cargo,rustyhorde/cargo,rustyhorde/cargo,vojtechkral/cargo,rust-lang/cargo,tsurai/cargo,rustyhorde/cargo,rust-lang/cargo,tsurai/cargo,vojtechkral/cargo,tshepang/cargo,tshepang/cargo,vojtechkral/cargo,nipunn1313/cargo,nipunn1313/cargo,eminence/cargo,nipunn1313/cargo