Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Fix voice in switch argument resolution help text (#215)
Maximilian Roos2d6f3d7fbe65
diff --git a/docs/content/switch.md b/docs/content/switch.mdindex 43dabf565..eeffbb087 100644--- a/docs/content/switch.md+++ b/docs/content/switch.md@@ -55,7 +55,7 @@ wt switch --create fix --base=@ # Branch from current HEAD## Argument resolution-If the branch has a worktree, switch to it. Otherwise, create a worktree at the expected path.+Switches to the branch's worktree if one exists, otherwise creates one at the expected path.If the expected path is occupied by a different branch's worktree, an error is raised.diff --git a/src/cli.rs b/src/cli.rsindex 8101bc551..3ec139217 100644--- a/src/cli.rs+++ b/src/cli.rs@@ -2057,7 +2057,7 @@ wt switch --create fix --base=@ # Branch from current HEAD## Argument resolution-If the branch has a worktree, switch to it. Otherwise, create a worktree at the expected path.+Switches to the branch's worktree if one exists, otherwise creates one at the expected path.If the expected path is occupied by a different branch's worktree, an error is raised.diff --git a/tests/integration_tests/list.rs b/tests/integration_tests/list.rsindex 17121c371..6586a56db 100644--- a/tests/integration_tests/list.rs+++ b/tests/integration_tests/list.rs@@ -661,7 +661,17 @@ fn test_list_with_upstream_tracking(mut repo: TestRepo) {.unwrap();// Scenario 5: Branch without upstream (should show blank)- repo.add_worktree("no-upstream");+ let no_upstream_wt = repo.add_worktree("no-upstream");++ // Run git status to ensure the worktree is fully initialized on Windows.+ // Without this, Windows CI may show 55y (Unix epoch) because the worktree+ // isn't ready when wt list tries to read commit timestamps.+ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["status", "--porcelain"])+ .current_dir(&no_upstream_wt)+ .output()+ .unwrap();// Run list --branches --full to show all columns including Remotelet settings = setup_snapshot_settings(&repo);diff --git a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap b/tests/snapshots/integration__integration_tests__help__help_switch_long.snapindex 54540f7fa..273acdb48 100644--- a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap@@ -109,7 +109,7 @@ The [2m--create[0m flag creates a new branch from the [2m--base[0m branch (d[32mArgument resolution-If the branch has a worktree, switch to it. Otherwise, create a worktree at the expected path.+Switches to the branch's worktree if one exists, otherwise creates one at the expected path.If the expected path is occupied by a different branch's worktree, an error is raised.