From 5f228dc046451d7aed965867ff230c6b8c3fa3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Fri, 17 May 2024 21:47:35 +0200 Subject: [PATCH] enable robust push --- lib/git.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/git.py b/lib/git.py index b0d99a8..3e25398 100644 --- a/lib/git.py +++ b/lib/git.py @@ -48,6 +48,7 @@ class Git: def open(self): if not self.exists(): self.git_run(["init", "--object-format=sha256", "-b", "factory"]) + self.git_run(["config", "lfs.allowincompletepush", "true"]) def is_dirty(self): """Check if there is something to commit""" @@ -271,13 +272,11 @@ class Git: ["remote"], stdout=subprocess.PIPE, ).stdout.decode("utf-8"): - logger.warning("Not pushing to remote because no 'origin' configured") + logging.warning("Not pushing to remote because no 'origin' configured") return cmd = ["push"] if force: cmd.append("-f") - cmd.append("origin") - cmd.append("refs/heads/factory") - cmd.append("refs/heads/devel") + cmd += ["origin", "--all"] self.git_run(cmd)