mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-15 05:20:20 -06:00
prevent infinite recursion of post-checkout on clone
This commit is contained in:
@@ -158,7 +158,8 @@ def init_repo(path: str, remote: str) -> None:
|
||||
remote = os.path.abspath(remote)
|
||||
|
||||
env = no_git_env()
|
||||
cmd_output_b('git', 'init', path, env=env)
|
||||
# avoid the user's template so that hooks do not recurse
|
||||
cmd_output_b('git', 'init', '--template=', path, env=env)
|
||||
cmd_output_b('git', 'remote', 'add', 'origin', remote, cwd=path, env=env)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user