From 86e0ef0d5eb80742e74943d752b002c89bad1596 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Tue, 27 Jul 2021 05:52:56 -0400 Subject: [PATCH] git_deploy: use "git pull --rebase" when repo debug is enabled Signed-off-by: Eric Callahan --- moonraker/components/update_manager/git_deploy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/moonraker/components/update_manager/git_deploy.py b/moonraker/components/update_manager/git_deploy.py index e8840ff..2adf316 100644 --- a/moonraker/components/update_manager/git_deploy.py +++ b/moonraker/components/update_manager/git_deploy.py @@ -468,8 +468,11 @@ class GitRepo: raise self.server.error( f"Git Repo {self.alias}: Cannot perform pull on a " "detached HEAD") + cmd = "pull --progress" + if self.cmd_helper.is_debug_enabled(): + cmd = "pull --progress --rebase" async with self.git_operation_lock: - await self._run_git_cmd_async("pull --progress") + await self._run_git_cmd_async(cmd) async def list_branches(self) -> List[str]: self._verify_repo()