diff options
author | LaMont Jones <lamontjones@google.com> | 2022-12-02 22:54:11 +0000 |
---|---|---|
committer | LaMont Jones <lamontjones@google.com> | 2022-12-05 18:11:24 +0000 |
commit | 100a2143156c9e35d84688da62124f6a629773dd (patch) | |
tree | 18b793c7b307fd67083ddead9e0f7e101e4cb508 | |
parent | 8051cdb6298a1916a28c9ff3ac5f897bdaa35c66 (diff) | |
download | git-repo-100a2143156c9e35d84688da62124f6a629773dd.tar.gz |
sync: finish marking REPO_AUTO_GC=1 as deprecated.
The wrong revision of the change was submitted as
d793553804c76677444709ebefd70f6e01c29525.
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>
-rw-r--r-- | subcmds/sync.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index 75512031..7cf303b3 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -67,8 +67,7 @@ from manifest_xml import GitcManifest | |||
67 | _ONE_DAY_S = 24 * 60 * 60 | 67 | _ONE_DAY_S = 24 * 60 * 60 |
68 | 68 | ||
69 | # Env var to implicitly turn auto-gc back on. This was added to allow a user to | 69 | # Env var to implicitly turn auto-gc back on. This was added to allow a user to |
70 | # revert a change in default behavior in v2.29.9, and will be removed in a | 70 | # revert a change in default behavior in v2.29.9. Remove after 2023-04-01. |
71 | # future release. | ||
72 | _REPO_AUTO_GC = 'REPO_AUTO_GC' | 71 | _REPO_AUTO_GC = 'REPO_AUTO_GC' |
73 | _AUTO_GC = os.environ.get(_REPO_AUTO_GC) == '1' | 72 | _AUTO_GC = os.environ.get(_REPO_AUTO_GC) == '1' |
74 | 73 | ||
@@ -1186,10 +1185,9 @@ later is required to fix a server side protocol bug. | |||
1186 | 1185 | ||
1187 | if opt.auto_gc is None and _AUTO_GC: | 1186 | if opt.auto_gc is None and _AUTO_GC: |
1188 | print(f"Will run `git gc --auto` because {_REPO_AUTO_GC} is set.", | 1187 | print(f"Will run `git gc --auto` because {_REPO_AUTO_GC} is set.", |
1189 | file=sys.stderr) | 1188 | f'{_REPO_AUTO_GC} is deprecated and will be removed in a future', |
1190 | opt.auto_gc = True | ||
1191 | print(f'{_REPO_AUTO_GC} is deprecated and will be removed in a future' | ||
1192 | 'release. Use `--auto-gc` instead.', file=sys.stderr) | 1189 | 'release. Use `--auto-gc` instead.', file=sys.stderr) |
1190 | opt.auto_gc = True | ||
1193 | 1191 | ||
1194 | def Execute(self, opt, args): | 1192 | def Execute(self, opt, args): |
1195 | manifest = self.outer_manifest | 1193 | manifest = self.outer_manifest |