mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-14 04:50:20 -06:00
Merge pull request #671 from rp-tanium/git_env_whitelist
Whitelists env var GIT_SSH
This commit is contained in:
@@ -77,7 +77,8 @@ def no_git_env():
|
||||
# GIT_DIR: Causes git clone to clone wrong thing
|
||||
# GIT_INDEX_FILE: Causes 'error invalid object ...' during commit
|
||||
return {
|
||||
k: v for k, v in os.environ.items() if not k.startswith('GIT_')
|
||||
k: v for k, v in os.environ.items()
|
||||
if not k.startswith('GIT_') or k in {'GIT_SSH'}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user