Skip to content

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

docs(switch): drop stale path-mismatch comments left by #3419 (#3450)

Worktrunk Bot2c7f24db3cf2
diff --git a/src/commands/worktree/switch.rs b/src/commands/worktree/switch.rs
index 89c074a75..31017ed0f 100644
--- a/src/commands/worktree/switch.rs
+++ b/src/commands/worktree/switch.rs
@@ -938,8 +938,6 @@ fn execute_switch(
SwitchResult::Existing { path }
};
- // Path mismatch is computed lazily by callers after first output,
- // avoiding ~7 git commands on the hot path for existing switches.
Ok((result, SwitchBranchInfo { branch }))
}
@@ -1211,8 +1209,8 @@ fn execute_switch(
}
}
-/// Resolve the deferred path mismatch for existing worktree switches.
-///
+/// Build a `GitError::WorktreeCreationFailed` from a failed `git worktree add`,
+/// extracting the underlying command output for the error message.
fn worktree_creation_error(
err: &anyhow::Error,
branch: String,