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.
This commit is contained in:
Alexander Heldt committed 2026-11-22 18:25:33 +01:00
1 parent c29f8c94e3
commit 426d29bbd4
2 files changed
+79

No files matched your search

+2
View File
@@ -40,6 +40,8 @@ in
autoload -Uz add-zsh-hook
add-zsh-hook precmd _nix_direnv_bridge_hook
source ${./wt.zsh}
'';
# Configure IntelliJ to exclude .direnv from indexing