summaryrefslogtreecommitdiffstats
path: root/subcmds/sync.py
diff options
context:
space:
mode:
authorJosip Sokcevic <sokcevic@google.com>2023-10-19 14:46:11 -0700
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-10-23 16:13:02 +0000
commit9267d587273c0f702d04c9c5cb122972f351f3f5 (patch)
tree12351b848bddf7889e92a6b1dda012f8d4117ab3 /subcmds/sync.py
parentae824fb2fc2770c84cc34c1956e4c76c8c972860 (diff)
downloadgit-repo-9267d587273c0f702d04c9c5cb122972f351f3f5.tar.gz
project: Speculative fix for project corruption
When a new shared project is added to manifest, there's a short window where objects can be deleted that are used by other projects. To close that window, set preciousObjects during git init. For non-shared projects, repo should correct the state in the same execution instance. Bug: 288102993 Change-Id: I366f524535ac58c820d51a88599ae2108df9ab48 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/390234 Commit-Queue: Josip Sokcevic <sokcevic@google.com> Tested-by: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r--subcmds/sync.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 8460bcec..48ceb468 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -1129,8 +1129,6 @@ later is required to fix a server side protocol bug.
1129 ) 1129 )
1130 project.config.SetString("gc.pruneExpire", "never") 1130 project.config.SetString("gc.pruneExpire", "never")
1131 else: 1131 else:
1132 if not opt.quiet:
1133 print(f"\r{relpath}: not shared, disabling pruning.")
1134 project.config.SetString("extensions.preciousObjects", None) 1132 project.config.SetString("extensions.preciousObjects", None)
1135 project.config.SetString("gc.pruneExpire", None) 1133 project.config.SetString("gc.pruneExpire", None)
1136 1134