mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Fix regression: try-repo from relative path
This commit is contained in:
parent
fbebd84494
commit
af93bec4fd
2 changed files with 14 additions and 1 deletions
|
|
@ -143,10 +143,12 @@ class Store(object):
|
|||
def clone_strategy(directory):
|
||||
env = no_git_env()
|
||||
|
||||
cmd = ('git', 'clone', '--no-checkout', repo, directory)
|
||||
cmd_output(*cmd, env=env)
|
||||
|
||||
def _git_cmd(*args):
|
||||
return cmd_output('git', *args, cwd=directory, env=env)
|
||||
|
||||
_git_cmd('clone', '--no-checkout', repo, '.')
|
||||
_git_cmd('reset', ref, '--hard')
|
||||
_git_cmd('submodule', 'update', '--init', '--recursive')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue