git fetch is required even when using lfs

This commit is contained in:
Louis Parisot
2024-09-10 11:00:17 +02:00
parent e774c70275
commit 04c70ce277

View File

@@ -1318,10 +1318,12 @@ def fetch_repository(
git_command = ["git", "remote", "set-url", "origin", remote_url] git_command = ["git", "remote", "set-url", "origin", remote_url]
logging_subprocess(git_command, cwd=local_dir) logging_subprocess(git_command, cwd=local_dir)
git_command = ["git", "fetch", "--all", "--force", "--tags", "--prune"]
if no_prune:
git_command.pop()
logging_subprocess(git_command, cwd=local_dir)
if lfs_clone: if lfs_clone:
git_command = ["git", "lfs", "fetch", "--all", "--prune"] git_command = ["git", "lfs", "fetch", "--all", "--prune"]
else:
git_command = ["git", "fetch", "--all", "--force", "--tags", "--prune"]
if no_prune: if no_prune:
git_command.pop() git_command.pop()
logging_subprocess(git_command, cwd=local_dir) logging_subprocess(git_command, cwd=local_dir)