Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Clarify hook execution timing in switch help text

Maximilian Roos4460635d2f97
diff --git a/docs/content/switch.md b/docs/content/switch.md
index c40254b40..0e03d89e5 100644
--- a/docs/content/switch.md
+++ b/docs/content/switch.md
@@ -8,7 +8,7 @@ group = "Commands"
<!-- ⚠️ AUTO-GENERATED from `wt switch --help-page` — edit cli.rs to update -->
-Change directory to a worktree, creating one if needed. Creating a worktree runs [hooks](@/hook.md).
+Change directory to a worktree, creating one if needed.
<figure class="demo">
<picture>
@@ -34,7 +34,7 @@ The `--create` flag creates a new branch from the `--base` branch (defaults to d
## Creating worktrees
-If the branch already has a worktree, `wt switch` changes directories to it. Otherwise, it creates one.
+If the branch already has a worktree, `wt switch` changes directories to it. Otherwise, it creates one, running [hooks](@/hook.md).
When creating a worktree, worktrunk:
diff --git a/src/cli.rs b/src/cli.rs
index cccb0c1c4..63ea2cd0d 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -2148,7 +2148,7 @@ Missing a field that would be generally useful? Open an issue at https://github.
/// Switch to a worktree
#[command(
- after_long_help = r#"Change directory to a worktree, creating one if needed. Creating a worktree runs [hooks](@/hook.md).
+ after_long_help = r#"Change directory to a worktree, creating one if needed.
<!-- demo: wt-switch.gif 1600x900 -->
Worktrees are addressed by branch name — each worktree has exactly one branch, and the path is derived automatically.
@@ -2168,7 +2168,7 @@ The `--create` flag creates a new branch from the `--base` branch (defaults to d
## Creating worktrees
-If the branch already has a worktree, `wt switch` changes directories to it. Otherwise, it creates one.
+If the branch already has a worktree, `wt switch` changes directories to it. Otherwise, it creates one, running [hooks](@/hook.md).
When creating a worktree, worktrunk:
diff --git a/tests/snapshots/integration__integration_tests__help__help_page_switch.snap b/tests/snapshots/integration__integration_tests__help__help_page_switch.snap
index ccc3df609..c887f4f56 100644
--- a/tests/snapshots/integration__integration_tests__help__help_page_switch.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_page_switch.snap
@@ -18,7 +18,7 @@ exit_code: 0
----- stdout -----
<!-- ⚠️ AUTO-GENERATED from `wt switch --help-page` — edit cli.rs to update -->
-Change directory to a worktree, creating one if needed. Creating a worktree runs [hooks](@/hook.md).
+Change directory to a worktree, creating one if needed.
<figure class="demo">
<picture>
@@ -44,7 +44,7 @@ The `--create` flag creates a new branch from the `--base` branch (defaults to d
## Creating worktrees
-If the branch already has a worktree, `wt switch` changes directories to it. Otherwise, it creates one.
+If the branch already has a worktree, `wt switch` changes directories to it. Otherwise, it creates one, running [hooks](@/hook.md).
When creating a worktree, worktrunk:
diff --git a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
index ca225d624..1c0fbe140 100644
--- a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
@@ -78,7 +78,7 @@ Usage: wt switch [OPTIONS] <BRANCH> [--
-v, --verbose
Show commands and debug info
-Change directory to a worktree, creating one if needed. Creating a worktree runs hooks.
+Change directory to a worktree, creating one if needed.
Worktrees are addressed by branch name — each worktree has exactly one branch, and the path is derived automatically.
@@ -95,7 +95,7 @@ The --create flag creates a new branch from the --base branch (d
Creating worktrees
-If the branch already has a worktree, wt switch changes directories to it. Otherwise, it creates one.
+If the branch already has a worktree, wt switch changes directories to it. Otherwise, it creates one, running hooks.
When creating a worktree, worktrunk: