Commit Graph
3 Commits
Author SHA1 Message Date
Alexander Heldt 67eb18c890 pinwheel: Run wt sync from the primary checkout
In a worktree, `gt sync` deletes a merged current branch by first
switching to main, which git refuses while the primary has main checked
out. `wt sync` now runs `gt sync` in the primary, which leaves a merged
branch checked out in a worktree alone.

Worktrees whose PR is merged are no longer restacked. They stay until
removed with `wt rm`, so a session in one can still be resumed. The
merged PRs are read from gt's `.graphite_pr_info` cache, which `gt sync`
has just refreshed; gt has no command that lists them.
2026-11-24 10:27:39 +01:00
Alexander Heldt b21c943b04 pinwheel: Add wt sync to restack every worktree
`gt sync` skips branches checked out in another worktree, so a stack
living in one stays on the old main. `wt sync` runs `gt sync`, then
`gt restack` in each worktree not on main. A conflict in one worktree
leaves it mid-rebase and does not stop the others; the failed
worktrees are listed at the end and the exit status is 1.
2026-11-23 08:14:32 +01:00
Alexander Heldt 426d29bbd4 pinwheel: Add wt for git worktrees beside the primary checkout
`wt <branch>` goes to the worktree holding a branch, creating one in
`<primary>.worktrees/<branch>` if needed; `wt -c` starts a new
Graphite-tracked branch off main in its own worktree; `wt rm` removes
one and keeps the branch.

A new worktree gets `direnv allow` only when its `.envrc` matches the
primary's. In backend it also gets a `.pants.rc` pinning `find_links`
to the primary's `dist/`: `pants.toml` sets it to the checkout's own
path, which put the path into every `requirements.pex` cache key and
made each worktree rebuild them. No lockfile resolves from it.
2026-11-22 18:25:33 +01:00