[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.
This commit is contained in:
Xavier Morel 2024-02-26 09:56:25 +01:00
parent de32b54090
commit bcf6074153

View File

@ -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)