Skip to content

Commit 8d5f032

Browse files
sokcevicGLUCI
authored andcommitted
gc: Add tags to remote pack list
If tags are omitted from the remote pack list, they must be present in local pack. However, local packs don't have promisor objects, meaning that all blobs must be available locally, and therefore all missing blobs will be downloaded during rev-list phase. Git downloads those sequentially, by invokving fetch operation (rev-list/fetch). Instead of downloading tags' blobs, instruct Git to include all tags in remote rev-list operation. This change was tested with `git fsck --all`. [email protected] Bug: b/392732561 Change-Id: Id94a40aebbe4f084c952329583d559d296db1a11 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/451422 Reviewed-by: Yiwei Zhang <[email protected]> Tested-by: Josip Sokcevic <[email protected]> Commit-Queue: Josip Sokcevic <[email protected]>
1 parent 99eca45 commit 8d5f032

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

subcmds/gc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ def repack_projects(self, projects: List[Project], opt):
206206
"--objects",
207207
f"--remotes={project.remote.name}",
208208
"--filter=blob:none",
209+
"--tags",
209210
],
210211
capture_stdout=True,
211212
verify_command=True,
@@ -228,6 +229,7 @@ def repack_projects(self, projects: List[Project], opt):
228229
"--indexed-objects",
229230
"--not",
230231
f"--remotes={project.remote.name}",
232+
"--tags",
231233
],
232234
capture_stdout=True,
233235
verify_command=True,

0 commit comments

Comments
 (0)