Skip to content

Commit 5034443

Browse files
authored
Merge pull request #338 from SkySoft-ATM/fetch_commits_when_lfs
git fetch is required even when using lfs
2 parents e774c70 + 04c70ce commit 5034443

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: github_backup/github_backup.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -1318,13 +1318,15 @@ def fetch_repository(
13181318
git_command = ["git", "remote", "set-url", "origin", remote_url]
13191319
logging_subprocess(git_command, cwd=local_dir)
13201320

1321-
if lfs_clone:
1322-
git_command = ["git", "lfs", "fetch", "--all", "--prune"]
1323-
else:
1324-
git_command = ["git", "fetch", "--all", "--force", "--tags", "--prune"]
1321+
git_command = ["git", "fetch", "--all", "--force", "--tags", "--prune"]
13251322
if no_prune:
13261323
git_command.pop()
13271324
logging_subprocess(git_command, cwd=local_dir)
1325+
if lfs_clone:
1326+
git_command = ["git", "lfs", "fetch", "--all", "--prune"]
1327+
if no_prune:
1328+
git_command.pop()
1329+
logging_subprocess(git_command, cwd=local_dir)
13281330
else:
13291331
logger.info(
13301332
"Cloning {0} repository from {1} to {2}".format(

0 commit comments

Comments
 (0)