Release Notes
Fixed
-
wt step copy-ignoredno longer self-lowers priority in the foreground: Since v0.37.0,copy-ignoredwrapped its work intaskpolicy -b(macOS) /ionice -c3(Linux) unconditionally, which throttled disk I/O for interactive runs and synchronouspre-*hooks — not just the backgroundpost-startflows the lowering was meant for. Detached background hook pipelines now set an internal sentinel, andcopy-ignoredonly self-lowers when it sees it. Interactivewt step copy-ignoredand foreground hooks run at normal priority. Seewt step copy-ignored --help→ Background-hook priority. (#2358, thanks @bram-rongen for reporting #2342) -
wt step commitno longer panics on large CRLF diffs containing multi-byte UTF-8:parse_diff_sectionsusedstr::lines()(strips\nand\r\n) but advanced the byte-offset accumulator byline.len() + 1, under-counting one byte per CRLF line. Once the diff exceeded the 400k filtering threshold the drift landed inside a multi-byte character and panicked withbyte index N is not a char boundary. Now iterates withsplit_inclusive('\n')so offsets match real byte positions regardless of line-ending style. (#2356, closes #2355, thanks @Qnurye for reporting with a minimal reproduction) -
wt step relocatesurfaces failedgit checkout/git worktree moveinstead of printing false success: The four rawCmd::new("git")...run()?call sites inrelocate.rsswallowed non-zero exit codes — only spawn errors propagated through?— so a failed checkout or move returnedOkand the caller printedRelocated 1 worktree. All four sites now route throughrepo.worktree_at(path).run_command(...), the project's fail-fast git pattern. Triggered most often whenworktrunk.default-branchcached a branch that no longer resolves locally. (#2348)
Improved
-
Alias dispatch ~15-20% faster via batched
rev-parse: Parent-side alias dispatch was firing four separategit rev-parsesubprocesses on the worktree path (--is-inside-work-tree,--show-toplevel,--git-dir,--symbolic-full-name HEAD). A newWorkingTree::prewarm_infofolds all four selectors into a single invocation and populates theworktree_roots,git_dirs, andcurrent_branchescaches so later accessors hit cache.benches/alias:warm/153.3 → 43.5 ms (−19.6%),cold/10062.1 → 49.7 ms (−18.2%). On systems with slowexecve(macOS Gatekeeper, AV), three saved forks translate to ~600 ms perwt <alias>. (#2352, thanks @markjaquith for continuing to report #2322) -
Non-submodule repos no longer pay for a failing submodule probe:
Repository::repo_path()used to rungit rev-parse --show-toplevelinside.gitto resolve the submodule case — that probe fails unconditionally on normal repos, costing ~5 ms per call. Now readscore.worktreedirectly from the bulk config map (the same signal git itself uses): bare repos short-circuit oncore.bare, submodules readcore.worktree, normal repos fall through toparent(git_common_dir). hyperfine on a healthy macOS system:wt noopin a normal repo 53.2 → 48.8 ms (1.09×); in a submodule 62.1 → 55.5 ms (1.12×).repo_path()fires ~2× during alias dispatch, so the win compounds. (#2350, thanks @markjaquith for reporting #2322)
Documentation
-
pre-startandpost-starthook rows say when the hook fires, not just what to put in it: The hook types table rows forpre-startandpost-startnow match the phrasing of neighbouring rows (pre-switchhas "Runs before…",post-mergehas "Runs in the target…"): "Runs once when a new worktree is created, blockingpost-start/--executeuntil complete" and "Runs once when a new worktree is created, in the background". (#2360, thanks @ortonomy for reporting #1571) -
Hook docs: Recipes restructured as a table of contents: The "Designing Effective Hooks" umbrella heading was removed; "Recipes" is promoted to a top-level section with each bullet leading with a specifically-named link to its Tips & Patterns section. "Copying untracked files" moved up next to the JSON context section. (#2349, #2351)
-
Refreshed stale docstrings across recently refactored modules. (#2354)
Internal
ahead_behindcollapsed into single get-or-insert accessor:cached_ahead_behindwas open-coded get-or-insert at the call site.ahead_behindnow readscache.ahead_behindfirst and falls back to the merge-base + rev-list computation on miss, caching the result. Thewt listahead/behind task collapses from a manual cache check + dual codepath to a single call.batch_ahead_behindstill primes the cache in bulk on git ≥ 2.36. (Breaking library API:Repository::cached_ahead_behindremoved.) (#2347)
Install worktrunk 0.43.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/max-sixty/worktrunk/releases/download/v0.43.0/worktrunk-installer.sh | sh && wt config shell installInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/max-sixty/worktrunk/releases/download/v0.43.0/worktrunk-installer.ps1 | iex"; git-wt config shell installInstall prebuilt binaries via Homebrew
brew install worktrunk && wt config shell installDownload worktrunk 0.43.0
| File | Platform | Checksum |
|---|---|---|
| worktrunk-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
| worktrunk-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
| worktrunk-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| worktrunk-aarch64-unknown-linux-musl.tar.xz | ARM64 MUSL Linux | checksum |
| worktrunk-x86_64-unknown-linux-musl.tar.xz | x64 MUSL Linux | checksum |
Install via Cargo
cargo install worktrunk && wt config shell installInstall via Winget (Windows)
winget install max-sixty.worktrunk && git-wt config shell installInstall via AUR (Arch Linux)
paru worktrunk-bin && wt config shell install