mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-14 04:50:20 -06:00
Fix autoupdate to always use non-shallow clone
This commit is contained in:
@@ -143,6 +143,15 @@ def has_diff(*args, **kwargs):
|
||||
return cmd_output(*cmd, cwd=repo, retcode=None)[0]
|
||||
|
||||
|
||||
def init_repo(path, remote):
|
||||
if os.path.isdir(remote):
|
||||
remote = os.path.abspath(remote)
|
||||
|
||||
env = no_git_env()
|
||||
cmd_output('git', 'init', path, env=env)
|
||||
cmd_output('git', 'remote', 'add', 'origin', remote, cwd=path, env=env)
|
||||
|
||||
|
||||
def commit(repo='.'):
|
||||
env = no_git_env()
|
||||
name, email = 'pre-commit', 'asottile+pre-commit@umich.edu'
|
||||
|
||||
Reference in New Issue
Block a user