mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04: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:
parent
b300116adc
commit
4eb91cdd8e
2 changed files with 12 additions and 1 deletions
|
|
@ -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',
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue