sync: finish marking REPO_AUTO_GC=1 as deprecated.

The wrong revision of the change was submitted as
d793553804.

Change-Id: I6f3e4993cf40c30ccf0d69020177db8fe5f76b8c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353934
Tested-by: LaMont Jones <lamontjones@google.com>
Reviewed-by: Sam Saccone <samccone@google.com>
This commit is contained in:
LaMont Jones 2022-12-02 22:54:11 +00:00
parent 8051cdb629
commit 100a214315

View File

@ -67,8 +67,7 @@ from manifest_xml import GitcManifest
_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 # 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, and will be removed in a # revert a change in default behavior in v2.29.9. Remove after 2023-04-01.
# future release.
_REPO_AUTO_GC = 'REPO_AUTO_GC' _REPO_AUTO_GC = 'REPO_AUTO_GC'
_AUTO_GC = os.environ.get(_REPO_AUTO_GC) == '1' _AUTO_GC = os.environ.get(_REPO_AUTO_GC) == '1'
@ -1186,10 +1185,9 @@ later is required to fix a server side protocol bug.
if opt.auto_gc is None and _AUTO_GC: if opt.auto_gc is None and _AUTO_GC:
print(f"Will run `git gc --auto` because {_REPO_AUTO_GC} is set.", print(f"Will run `git gc --auto` because {_REPO_AUTO_GC} is set.",
file=sys.stderr) f'{_REPO_AUTO_GC} is deprecated and will be removed in a future',
opt.auto_gc = True
print(f'{_REPO_AUTO_GC} is deprecated and will be removed in a future'
'release. Use `--auto-gc` instead.', file=sys.stderr) 'release. Use `--auto-gc` instead.', file=sys.stderr)
opt.auto_gc = True
def Execute(self, opt, args): def Execute(self, opt, args):
manifest = self.outer_manifest manifest = self.outer_manifest