mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Merge pull request #671 from rp-tanium/git_env_whitelist
Whitelists env var GIT_SSH
This commit is contained in:
commit
a61358662a
1 changed files with 2 additions and 1 deletions
|
|
@ -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'}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue