When loading cached results at runtime, the output repo tries checking out a new branch if it does yet not exist locally. However, this causes the run to fail because other files might already be present in the output repo.
|
self.output_repo.checkout(branch_name) |
Instead, use something like the following:
if branch_name not in local_branches:
self.output_repo._git.create_head(
branch_name
)
Note, this is just quick-and-dirty fix. It would be better to add a method to our GitRepo class which wraps git.Repo.