mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-14 17:41:45 +04:00
Merge 0287f07421 into 5c0f3024d2
This commit is contained in:
commit
a278e2bb8b
1 changed files with 6 additions and 2 deletions
|
|
@ -186,6 +186,10 @@ class Store:
|
|||
|
||||
git_config = 'protocol.version=2'
|
||||
git_cmd('-c', git_config, 'fetch', 'origin', ref, '--depth=1')
|
||||
git_cmd(
|
||||
'-c', git_config, 'fetch', 'origin',
|
||||
f'refs/tags/{ref}:refs/tags/{ref}', '--depth=1', check=False,
|
||||
)
|
||||
git_cmd('checkout', 'FETCH_HEAD')
|
||||
git_cmd(
|
||||
'-c', git_config, 'submodule', 'update', '--init', '--recursive',
|
||||
|
|
@ -199,8 +203,8 @@ class Store:
|
|||
git.init_repo(directory, repo)
|
||||
env = git.no_git_env()
|
||||
|
||||
def _git_cmd(*args: str) -> None:
|
||||
cmd_output_b('git', *args, cwd=directory, env=env)
|
||||
def _git_cmd(*args: str, check: bool = True) -> None:
|
||||
cmd_output_b('git', *args, cwd=directory, env=env, check=check)
|
||||
|
||||
try:
|
||||
self._shallow_clone(ref, _git_cmd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue