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.
`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.
`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.
systemd-tmpfiles now ensures ~/code and ~/code/work are owned by
alex, since agenix previously created ~/code/work as root when the
work secrets pointed there directly.
Also drop the custom path= on work-gitconfig, work-github-token, and
work-go-private so they use agenix's default secret path instead of
living under ~/code/work.