mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
reduces line length
This commit is contained in:
parent
e3cf0975f9
commit
9eadfb92fd
1 changed files with 2 additions and 3 deletions
|
|
@ -77,10 +77,9 @@ def no_git_env():
|
||||||
# GIT_DIR: Causes git clone to clone wrong thing
|
# GIT_DIR: Causes git clone to clone wrong thing
|
||||||
# GIT_INDEX_FILE: Causes 'error invalid object ...' during commit
|
# GIT_INDEX_FILE: Causes 'error invalid object ...' during commit
|
||||||
|
|
||||||
# list of explicitly whitelisted variables
|
|
||||||
allowed_git_envs = ['GIT_SSH']
|
|
||||||
return {
|
return {
|
||||||
k: v for k, v in os.environ.items() if not k.startswith('GIT_') or k in allowed_git_envs
|
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