Skip to content

Windows: worktrees stay on the repo's side of the WSL boundary #434

Closed

Description

@currentbits

Follow-up to #397. electron/wsl.js and the wrapCommand/resolveSpawn seam landed (commit 4a21944). Remaining: setupWorktree in electron/worktrees.js joins worktreeBase (app userData, a Windows path) with the thread id. For a WSL-side project that puts the worktree on the Windows side of the boundary — and 'git worktree add' running through wsl.exe cannot even address it. Worktrees for a WSL-side project must land inside the distro, never under /mnt/c. Also: the gitOut/gitOutAsync helpers in worktrees.js must route through the wrap seam, and file watching on Windows must poll.

Activity

  1. added and removed on Aug 18, 2026
  2. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Merged into the #397 branch. WSL-side worktrees now land inside the distro at /.solenta/worktrees/ (/tmp/solenta-worktrees when the repo itself is on /mnt/), with the matching UNC stored as worktreePath so Windows-side existsSync still works. worktrees.js git helpers share one resolveGitCommand wrap: a UNC cwd becomes wsl.exe --cd and UNC path args are rewritten to linux paths. Known gap, marked with a ponytail comment: sweepOrphanWorktrees only scans the userData base, so WSL-side worktrees are not orphan-swept — thread-keyed cleanup still reaches them. Confirmed there is no file watcher today (status/diff on demand, PR refresh interval-polled), so the poll-watching half of the rule is a note, not code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions