Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9cde231

Browse files
committed
respect GIT_EXEC_PATH env
This env may be required for git to work, unsetting it can cause clone to fail occurs with bundled git, e.g. Fork git client
1 parent 889124b commit 9cde231

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pre_commit/git.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ def no_git_env():
2929
# GIT_INDEX_FILE: Causes 'error invalid object ...' during commit
3030
return {
3131
k: v for k, v in os.environ.items()
32-
if not k.startswith('GIT_') or k in {'GIT_SSH', 'GIT_SSH_COMMAND'}
32+
if not k.startswith('GIT_') or
33+
k in {'GIT_EXEC_PATH', 'GIT_SSH', 'GIT_SSH_COMMAND'}
3334
}
3435

3536

0 commit comments

Comments
 (0)