Skip to content

Commit 55f8999

Browse files
committed
Enh: Correct way of pulling relevant branch
1 parent 2ab0665 commit 55f8999

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

codeclash/agents/player.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def __init__(
5050
self.logger.info(f"Pulling latest changes from origin for {self.name}")
5151
assert_zero_exit_code(self.environment.execute("git pull origin"), logger=self.logger)
5252
if branch := config.get("branch_init"):
53-
self.logger.info(f"Checkout out branch {branch}")
53+
self.logger.info(f"Fetching and checking out branch {branch}")
54+
assert_zero_exit_code(self.environment.execute(f"git fetch origin {branch}"), logger=self.logger)
5455
assert_zero_exit_code(self.environment.execute(f"git checkout {branch}"), logger=self.logger)
5556

5657
if self.push:

0 commit comments

Comments
 (0)