From bcf6074153d338b895ead938f5b9891d66059d40 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 26 Feb 2024 09:56:25 +0100 Subject: [PATCH] [FIX] runbot_merge: maintenance gc command `gc --prune` can not take a *separate* parameter, it has to be part of the same arg (the `=` is not optional), otherwise the `gc` call blows up. So use the positional form of the git command to generate the correct invocation, Python-level `foo=bar` generates a split-style option in two args which does not please git. --- runbot_merge/models/crons/git_maintenance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runbot_merge/models/crons/git_maintenance.py b/runbot_merge/models/crons/git_maintenance.py index d392d868..2b0e2182 100644 --- a/runbot_merge/models/crons/git_maintenance.py +++ b/runbot_merge/models/crons/git_maintenance.py @@ -32,6 +32,6 @@ class GC(models.TransientModel): r = repo_git\ .stdout(True)\ .with_config(stderr=subprocess.STDOUT, text=True, check=False)\ - .gc(aggressive=True, prune='now') + .gc('--prune=now', aggressive=True) if r.returncode: _gc.warning("Maintenance failure (status=%d):\n%s", r.returncode, r.stdout)