mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Merge 55f9ae755e into 8416413a0e
This commit is contained in:
commit
6574bc91d1
1 changed files with 3 additions and 2 deletions
|
|
@ -186,6 +186,7 @@ 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 +200,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=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