summaryrefslogtreecommitdiffstats
path: root/subcmds/gc.py
diff options
context:
space:
mode:
authorJosip Sokcevic <sokcevic@google.com>2025-02-05 19:35:45 +0000
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2025-02-05 12:36:27 -0800
commit8d5f03261164f3cd65af0576dfa7d4edded96c67 (patch)
tree86dbe9358bf0711f6ac6416570ab4f47c1f4b9eb /subcmds/gc.py
parent99eca45eb2d578cd853bc5b0bf83f7b175e60b72 (diff)
downloadgit-repo-8d5f03261164f3cd65af0576dfa7d4edded96c67.tar.gz
gc: Add tags to remote pack listv2.52
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`. R=yiwzhang@google.com Bug: b/392732561 Change-Id: Id94a40aebbe4f084c952329583d559d296db1a11 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/451422 Reviewed-by: Yiwei Zhang <yiwzhang@google.com> Tested-by: Josip Sokcevic <sokcevic@chromium.org> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Diffstat (limited to 'subcmds/gc.py')
-rw-r--r--subcmds/gc.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/subcmds/gc.py b/subcmds/gc.py
index 0831dc3c..4e5bcabf 100644
--- a/subcmds/gc.py
+++ b/subcmds/gc.py
@@ -206,6 +206,7 @@ class Gc(Command):
206 "--objects", 206 "--objects",
207 f"--remotes={project.remote.name}", 207 f"--remotes={project.remote.name}",
208 "--filter=blob:none", 208 "--filter=blob:none",
209 "--tags",
209 ], 210 ],
210 capture_stdout=True, 211 capture_stdout=True,
211 verify_command=True, 212 verify_command=True,
@@ -228,6 +229,7 @@ class Gc(Command):
228 "--indexed-objects", 229 "--indexed-objects",
229 "--not", 230 "--not",
230 f"--remotes={project.remote.name}", 231 f"--remotes={project.remote.name}",
232 "--tags",
231 ], 233 ],
232 capture_stdout=True, 234 capture_stdout=True,
233 verify_command=True, 235 verify_command=True,