Description
Opening a checked-out worktree from a bare repository in the Desktop app can resolve the project root/sidebar entry to the bare repository path instead of the selected worktree.
Project.fromDirectory currently uses git rev-parse --git-common-dir as project.worktree when core.bare=true. That preserves the project ID cache location, but Desktop surfaces also treat project.worktree as a checked-out workspace root.
Plugins
None
OpenCode version
Current dev branch
Steps to reproduce
- Create a bare repository.
- Add a git worktree from that bare repository.
- Open the checked-out worktree with the Desktop Open Project dialog.
- The project can collapse to the bare repository path instead of keeping the checked-out worktree as the project root.
Screenshot and/or share link
N/A
Operating System
macOS
Terminal
Desktop app
Description
Opening a checked-out worktree from a bare repository in the Desktop app can resolve the project root/sidebar entry to the bare repository path instead of the selected worktree.
Project.fromDirectorycurrently usesgit rev-parse --git-common-dirasproject.worktreewhencore.bare=true. That preserves the project ID cache location, but Desktop surfaces also treatproject.worktreeas a checked-out workspace root.Plugins
None
OpenCode version
Current dev branch
Steps to reproduce
Screenshot and/or share link
N/A
Operating System
macOS
Terminal
Desktop app