summaryrefslogtreecommitdiffstats
path: root/subcmds/sync.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r--subcmds/sync.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 1ed37cef..5b41046d 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -70,7 +70,9 @@ _ONE_DAY_S = 24 * 60 * 60
70REPO_BACKUP_OBJECTS = 'REPO_BACKUP_OBJECTS' 70REPO_BACKUP_OBJECTS = 'REPO_BACKUP_OBJECTS'
71_BACKUP_OBJECTS = os.environ.get(REPO_BACKUP_OBJECTS) != '0' 71_BACKUP_OBJECTS = os.environ.get(REPO_BACKUP_OBJECTS) != '0'
72 72
73# Env var to implicitly turn auto-gc back on. 73# Env var to implicitly turn auto-gc back on. This was added to allow a user to
74# revert a change in default behavior in v2.29.9, and will be removed in a
75# future release.
74_REPO_AUTO_GC = 'REPO_AUTO_GC' 76_REPO_AUTO_GC = 'REPO_AUTO_GC'
75_AUTO_GC = os.environ.get(_REPO_AUTO_GC) == '1' 77_AUTO_GC = os.environ.get(_REPO_AUTO_GC) == '1'
76 78
@@ -1226,6 +1228,8 @@ later is required to fix a server side protocol bug.
1226 print(f"Will run `git gc --auto` because {_REPO_AUTO_GC} is set.", 1228 print(f"Will run `git gc --auto` because {_REPO_AUTO_GC} is set.",
1227 file=sys.stderr) 1229 file=sys.stderr)
1228 opt.auto_gc = True 1230 opt.auto_gc = True
1231 print(f'{_REPO_AUTO_GC} is deprecated and will be removed in a future'
1232 'release. Use `--auto-gc` instead.', file=sys.stderr)
1229 1233
1230 def Execute(self, opt, args): 1234 def Execute(self, opt, args):
1231 manifest = self.outer_manifest 1235 manifest = self.outer_manifest