This commit is contained in:
Gnought 2026-02-14 13:49:47 +00:00 committed by GitHub
commit 6574bc91d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -186,6 +186,7 @@ class Store:
git_config = 'protocol.version=2' git_config = 'protocol.version=2'
git_cmd('-c', git_config, 'fetch', 'origin', ref, '--depth=1') 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('checkout', 'FETCH_HEAD')
git_cmd( git_cmd(
'-c', git_config, 'submodule', 'update', '--init', '--recursive', '-c', git_config, 'submodule', 'update', '--init', '--recursive',
@ -199,8 +200,8 @@ class Store:
git.init_repo(directory, repo) git.init_repo(directory, repo)
env = git.no_git_env() env = git.no_git_env()
def _git_cmd(*args: str) -> None: def _git_cmd(*args: str, check=True) -> None:
cmd_output_b('git', *args, cwd=directory, env=env) cmd_output_b('git', *args, cwd=directory, env=env, check=check)
try: try:
self._shallow_clone(ref, _git_cmd) self._shallow_clone(ref, _git_cmd)