From cc9f06b22c7665893e6958f7518a9e8d258e7d98 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Jun 2020 11:11:21 +0200 Subject: Adding upstream version 2.5.1. Signed-off-by: Daniel Baumann --- pre_commit/git.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pre_commit/git.py') diff --git a/pre_commit/git.py b/pre_commit/git.py index 7e757f2..576bef8 100644 --- a/pre_commit/git.py +++ b/pre_commit/git.py @@ -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) -- cgit v1.2.3