support gitconfig from env

Add exceptions to the git env so externally configured gitconfig
values set via GIT_CONFIG_KEY_<n>, GIT_CONFIG_VALUE_<n> and
GIT_CONFIG_COUNT get passed through.
This commit is contained in:
Marius Zwicker
2021-11-22 21:54:58 +01:00
committed by Anthony Sottile
parent b300116adc
commit 4eb91cdd8e
2 changed files with 12 additions and 1 deletions

View File

@@ -41,9 +41,10 @@ def no_git_env(
return {
k: v for k, v in _env.items()
if not k.startswith('GIT_') or
k.startswith(('GIT_CONFIG_KEY_', 'GIT_CONFIG_VALUE_')) or
k in {
'GIT_EXEC_PATH', 'GIT_SSH', 'GIT_SSH_COMMAND', 'GIT_SSL_CAINFO',
'GIT_SSL_NO_VERIFY',
'GIT_SSL_NO_VERIFY', 'GIT_CONFIG_COUNT',
}
}