From fec8cd6704b8ca7e01ed2de9d8757a2afd35188b Mon Sep 17 00:00:00 2001 From: Greg Edelston Date: Tue, 20 Feb 2024 10:07:53 -0700 Subject: [PATCH] subcmds: sync: Remove deprecated _AUTO_GC Opportunistic cleanup. It looks like this deprecated feature was slated for deletion nearly a year ago. Bug: None Test: ./run_tests Change-Id: I0bd0c0e6acbd1eaee1c0b4945c79038257d22f44 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/410198 Reviewed-by: Yiwei Zhang Commit-Queue: Greg Edelston Tested-by: Greg Edelston --- subcmds/sync.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/subcmds/sync.py b/subcmds/sync.py index 6004e306..bf1171dd 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -82,11 +82,6 @@ from wrapper import Wrapper _ONE_DAY_S = 24 * 60 * 60 -# Env var to implicitly turn auto-gc back on. This was added to allow a user to -# revert a change in default behavior in v2.29.9. Remove after 2023-04-01. -_REPO_AUTO_GC = "REPO_AUTO_GC" -_AUTO_GC = os.environ.get(_REPO_AUTO_GC) == "1" - _REPO_ALLOW_SHALLOW = os.environ.get("REPO_ALLOW_SHALLOW") logger = RepoLogger(__file__) @@ -1575,16 +1570,6 @@ later is required to fix a server side protocol bug. if opt.prune is None: opt.prune = True - if opt.auto_gc is None and _AUTO_GC: - logger.error( - "Will run `git gc --auto` because %s is set. %s is deprecated " - "and will be removed in a future release. Use `--auto-gc` " - "instead.", - _REPO_AUTO_GC, - _REPO_AUTO_GC, - ) - opt.auto_gc = True - def _ValidateOptionsWithManifest(self, opt, mp): """Like ValidateOptions, but after we've updated the manifest.