mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
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 <yiwzhang@google.com> Commit-Queue: Greg Edelston <gredelston@google.com> Tested-by: Greg Edelston <gredelston@google.com>
This commit is contained in:
parent
b8139bdcf8
commit
fec8cd6704
@ -82,11 +82,6 @@ from wrapper import Wrapper
|
|||||||
|
|
||||||
_ONE_DAY_S = 24 * 60 * 60
|
_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")
|
_REPO_ALLOW_SHALLOW = os.environ.get("REPO_ALLOW_SHALLOW")
|
||||||
|
|
||||||
logger = RepoLogger(__file__)
|
logger = RepoLogger(__file__)
|
||||||
@ -1575,16 +1570,6 @@ later is required to fix a server side protocol bug.
|
|||||||
if opt.prune is None:
|
if opt.prune is None:
|
||||||
opt.prune = True
|
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):
|
def _ValidateOptionsWithManifest(self, opt, mp):
|
||||||
"""Like ValidateOptions, but after we've updated the manifest.
|
"""Like ValidateOptions, but after we've updated the manifest.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user