From 3f7cae09bb12dc332ba779e5aaae84f69c58de7d Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Sat, 27 Jan 2024 13:55:53 -0500 Subject: [PATCH] git_deploy: specify branch in clone command 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 581799e..a49207b 100644 --- a/moonraker/components/update_manager/git_deploy.py +++ b/moonraker/components/update_manager/git_deploy.py @@ -877,7 +877,10 @@ class GitRepo: if self.backup_path.exists(): await event_loop.run_in_thread(shutil.rmtree, self.backup_path) await self._check_lock_file_exists(remove=True) - cmd = f"clone --filter=blob:none {self.recovery_url} {self.backup_path}" + cmd = ( + f"clone --branch {self.primary_branch} --filter=blob:none " + f"{self.recovery_url} {self.backup_path}" + ) try: await self._run_git_cmd_async(cmd, 1, False, False) except Exception as e: