Skip to content

Commit b1bc8c0

Browse files
charlesfryeOpenCode
andauthored
fix: use --no-single-branch in opencode_server.py git clone (#1492)
Without --no-single-branch, git only fetches the specified branch refspec, preventing 'gh pr create' from seeing newly pushed branches. Co-authored-by: OpenCode <opencode@modal.com>
1 parent c2808f7 commit b1bc8c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

13_sandboxes/opencode_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ def clone_github_repo(
7373
# For public repositories, no token is needed.
7474

7575
if token:
76-
clone_cmd = f"GIT_ASKPASS=echo git clone --quiet --depth 1 --branch {ref} https://oauth2:{token}@github.com/{repo}.git /root/code"
76+
clone_cmd = f"GIT_ASKPASS=echo git clone --quiet --depth 1 --branch {ref} --no-single-branch https://oauth2:{token}@github.com/{repo}.git /root/code"
7777
else:
78-
clone_cmd = f"GIT_TERMINAL_PROMPT=0 git clone --quiet --depth 1 --branch {ref} https://github.com/{repo}.git /root/code"
78+
clone_cmd = f"GIT_TERMINAL_PROMPT=0 git clone --quiet --depth 1 --branch {ref} --no-single-branch https://github.com/{repo}.git /root/code"
7979

8080
print(f"🏖️ Cloning {repo}@{ref} to /root/code")
8181
return image.run_commands(git_config, clone_cmd, force_build=True)

0 commit comments

Comments
 (0)