Skip to content

Commit 7b15a4d

Browse files
committed
Fetch all branches when cloning workspaces in web mode
`git clone --depth 1` implies `--single-branch`, so only the default branch's remote-tracking ref was fetched. The branch selector then had nothing to list beyond `main`. Pass `--no-single-branch` to keep all branches visible at depth 1.
1 parent cca202f commit 7b15a4d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

backend/app/services/workspace.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@ async def _clone_git_workspace(
363363
"clone",
364364
"--depth",
365365
"1",
366+
# `--depth` implies `--single-branch`, which leaves only the default
367+
# branch's remote-tracking ref — the branch selector then has nothing
368+
# to list beyond `main`. Keep all branches visible at depth 1.
369+
"--no-single-branch",
366370
git_url,
367371
str(workspace_dir),
368372
stdout=asyncio.subprocess.PIPE,

0 commit comments

Comments
 (0)