mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-14 13:00:10 -06:00
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:
committed by
Anthony Sottile
parent
b300116adc
commit
4eb91cdd8e
@@ -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',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user