mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-05 16:18:02 +01:00
Merge pull request #338 from SkySoft-ATM/fetch_commits_when_lfs
git fetch is required even when using lfs
This commit is contained in:
@@ -1318,13 +1318,15 @@ 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)
|
||||||
|
|
||||||
if lfs_clone:
|
git_command = ["git", "fetch", "--all", "--force", "--tags", "--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)
|
||||||
|
if lfs_clone:
|
||||||
|
git_command = ["git", "lfs", "fetch", "--all", "--prune"]
|
||||||
|
if no_prune:
|
||||||
|
git_command.pop()
|
||||||
|
logging_subprocess(git_command, cwd=local_dir)
|
||||||
else:
|
else:
|
||||||
logger.info(
|
logger.info(
|
||||||
"Cloning {0} repository from {1} to {2}".format(
|
"Cloning {0} repository from {1} to {2}".format(
|
||||||
|
|||||||
Reference in New Issue
Block a user