From bdbc5c63ac3a32bfdc381894afb4f9ea23fb3453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Schm=C3=B6lder?= Date: Thu, 27 Nov 2025 10:51:52 +0100 Subject: [PATCH] Do not check out new branch when loading cached results during runtime --- cadetrdm/repositories.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cadetrdm/repositories.py b/cadetrdm/repositories.py index 595e79f..996d0c2 100644 --- a/cadetrdm/repositories.py +++ b/cadetrdm/repositories.py @@ -1368,7 +1368,9 @@ def copy_data_to_cache(self, branch_name=None, target_folder=None): # Ensure that the branch is available locally. If it's only a remote branch, git.archive will fail. local_branches = [head.name for head in self.output_repo._git_repo.heads] if branch_name not in local_branches: - self.output_repo.checkout(branch_name) + self.output_repo._git_repo.create_head( + branch_name, f"origin/{branch_name}" + ) # Create the target folder if it doesn't exist if not target_folder.exists():