Skip to content

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

docs(config): correct two docstrings naming retired template variables (#4139)

Worktrunk Botadb738cee669
diff --git a/src/config/commands.rs b/src/config/commands.rs
index b09842a16..3e7bfdf5a 100644
--- a/src/config/commands.rs
+++ b/src/config/commands.rs
@@ -40,7 +40,7 @@ use serde::{Deserialize, Serialize};
pub struct Command {
/// Optional name for the command (e.g., "build", "test")
pub name: Option<String>,
- /// Template string that may contain variables like {{ branch }}, {{ worktree }}
+ /// Template string that may contain variables like {{ branch }}, {{ worktree_path }}
pub template: String,
}
diff --git a/src/config/deprecation.rs b/src/config/deprecation.rs
index 0a49fc38a..4ece059c6 100644
--- a/src/config/deprecation.rs
+++ b/src/config/deprecation.rs
@@ -120,6 +120,13 @@ static WARNED_UNKNOWN_PATHS: LazyLock<Mutex<HashSet<PathBuf>>> =
/// renders under minijinja's default `UndefinedBehavior::Lenient`, which
/// iterates an undefined value as an empty sequence, so the prompt would lose
/// its commit list silently — the outcome #2984 opens by calling out.
+///
+/// TODO(retired-vars): revisit dropping these rows after 2026-12-16, three
+/// months on from the load-time rewrite (#4080). Dropping a row stops the
+/// rename, so the old name has to fail loudly on its own before it goes, and
+/// the split above is what makes the rows non-uniform: the `SemiStrict`
+/// surfaces already do, while `commits` can only go once `build_prompt`
+/// rejects the name itself (#2984).
const RETIRED_VARS: &[(&str, &str)] = &[
("repo_root", "repo_path"),
("worktree", "worktree_path"),
diff --git a/src/config/user/accessors.rs b/src/config/user/accessors.rs
index c83f6e354..a4b188570 100644
--- a/src/config/user/accessors.rs
+++ b/src/config/user/accessors.rs
@@ -229,8 +229,7 @@ impl UserConfig {
/// Format a worktree path using this configuration's template.
///
/// # Arguments
- /// * `main_worktree` - Main worktree directory name; supplies both
- /// `{{ main_worktree }}` and `{{ repo }}`
+ /// * `main_worktree` - Main worktree directory name; supplies `{{ repo }}`
/// * `branch` - Branch name (replaces {{ branch }} in template; use `{{ branch | sanitize }}` for paths)
/// * `repo` - Repository, for template function access and for the
/// `{{ repo_path }}`, `{{ owner }}`, and {{ remote_repo }} values read off it —