You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: run checkout hooks when worktree already exists (#71) (#72)
Previously, `wt checkout` skipped pre/post checkout hooks when the
worktree already existed due to an early return. Now hooks run
regardless of whether the worktree is new or existing.
Copy file name to clipboardExpand all lines: docs/configuration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,7 @@ Hooks let you run custom commands before or after `wt` operations. Define them i
98
98
|`pre_pr` / `post_pr`| Before/after `wt pr`|
99
99
|`pre_mr` / `post_mr`| Before/after `wt mr`|
100
100
101
-
Hooks only run when a **new worktree is actually created** (or removed). If a worktree already exists, the early-return path skips hooks entirely.
101
+
Checkout hooks (`pre_checkout` / `post_checkout`) run both when a new worktree is created**and** when checking out an existing worktree. Create and remove hooks run only when a worktree is actually created or removed.
102
102
103
103
**Environment variables** available in hook commands:
0 commit comments