Skip to content

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

feat(commit-generation): deprecate `commits` squash template variable (#2985)

Worktrunk Bot0d9b9b80827e
diff --git a/dev/config.example.toml b/dev/config.example.toml
index 56f908a8f..e5acc688b 100644
--- a/dev/config.example.toml
+++ b/dev/config.example.toml
@@ -251,8 +251,7 @@
#
# Available variables (in addition to commit template variables):
#
-# - `{{ commits }}` — list of commit subjects being squashed
-# - `{{ commit_details }}` — [experimental] list of commits being squashed as `{ subject, body }` objects
+# - `{{ commit_details }}` — list of commits being squashed; each renders as its subject and exposes `.subject` / `.body`
# - `{{ target_branch }}` — merge target branch
#
# Default template:
@@ -283,7 +282,7 @@
# </project-guidance>
# {% endif %}
# <commits branch="{{ branch }}" target="{{ target_branch }}">
-# {% for commit in commits %}- {{ commit }}
+# {% for detail in commit_details %}- {{ detail.subject }}
# {% endfor %}</commits>
#
# <diffstat>
diff --git a/docs/content/config.md b/docs/content/config.md
index 43fe91f76..03362775f 100644
--- a/docs/content/config.md
+++ b/docs/content/config.md
@@ -357,8 +357,7 @@ Branch: {{ branch }}
Available variables (in addition to commit template variables):
-- `{{ commits }}` — list of commit subjects being squashed
-- `{{ commit_details }}` — <span class="badge-experimental"></span> list of commits being squashed as `{ subject, body }` objects
+- `{{ commit_details }}` — list of commits being squashed; each renders as its subject and exposes `.subject` / `.body`
- `{{ target_branch }}` — merge target branch
Default template:
@@ -390,7 +389,7 @@ squash-template = """
</project-guidance>
{% endif %}
<commits branch="{{ branch }}" target="{{ target_branch }}">
-{% for commit in commits %}- {{ commit }}
+{% for detail in commit_details %}- {{ detail.subject }}
{% endfor %}</commits>
<diffstat>
diff --git a/docs/content/llm-commits.md b/docs/content/llm-commits.md
index b9b6dff42..7ca52d438 100644
--- a/docs/content/llm-commits.md
+++ b/docs/content/llm-commits.md
@@ -162,9 +162,9 @@ Diff:
"""
squash-template = """
-Combine these {{ commits | length }} commits into one message:
-{% for c in commits %}
-- {{ c }}
+Combine these {{ commit_details | length }} commits into one message:
+{% for c in commit_details %}
+- {{ c.subject }}
{% endfor %}
Diff:
@@ -181,8 +181,7 @@ Diff:
| `{{ branch }}` | Current branch name |
| `{{ repo }}` | Repository name |
| `{{ recent_commits }}` | Recent commit subjects (for style reference) |
-| `{{ commits }}` | Commit subjects being squashed (squash template only) |
-| `{{ commit_details }}` | Commits being squashed as `{ subject, body }` (squash template only) <span class="badge-experimental"></span> |
+| `{{ commit_details }}` | Commits being squashed (squash template only); each renders as its subject and exposes `.subject` / `.body` |
| `{{ target_branch }}` | Merge target branch (squash template only) |
| `{{ user_guidance }}` | Rendered user `template-append` fragment (see below) |
| `{{ project_guidance }}` | Rendered project `template-append` fragment (see below) |
@@ -192,9 +191,9 @@ Diff:
Templates use [minijinja](https://docs.rs/minijinja/latest/minijinja/syntax/index.html), which supports:
- **Variables**: `{{ branch }}`, `{{ repo | upper }}`
-- **Filters**: `{{ commits | length }}`, `{{ repo | upper }}`
+- **Filters**: `{{ commit_details | length }}`, `{{ repo | upper }}`
- **Conditionals**: `{% if recent_commits %}...{% endif %}`
-- **Loops**: `{% for c in commits %}{{ c }}{% endfor %}`
+- **Loops**: `{% for c in commit_details %}{{ c.subject }}{% endfor %}`
- **Loop variables**: `{{ loop.index }}`, `{{ loop.length }}`
- **Whitespace control**: `{%- ... -%}` strips surrounding whitespace
diff --git a/skills/worktrunk/reference/config.md b/skills/worktrunk/reference/config.md
index 8234a9070..52c17e5fe 100644
--- a/skills/worktrunk/reference/config.md
+++ b/skills/worktrunk/reference/config.md
@@ -356,8 +356,7 @@ Branch: {{ branch }}
Available variables (in addition to commit template variables):
-- `{{ commits }}` — list of commit subjects being squashed
-- `{{ commit_details }}` — [experimental] list of commits being squashed as `{ subject, body }` objects
+- `{{ commit_details }}` — list of commits being squashed; each renders as its subject and exposes `.subject` / `.body`
- `{{ target_branch }}` — merge target branch
Default template:
@@ -389,7 +388,7 @@ squash-template = """
</project-guidance>
{% endif %}
<commits branch="{{ branch }}" target="{{ target_branch }}">
-{% for commit in commits %}- {{ commit }}
+{% for detail in commit_details %}- {{ detail.subject }}
{% endfor %}</commits>
<diffstat>
diff --git a/skills/worktrunk/reference/llm-commits.md b/skills/worktrunk/reference/llm-commits.md
index 8f375e356..8bdf3118c 100644
--- a/skills/worktrunk/reference/llm-commits.md
+++ b/skills/worktrunk/reference/llm-commits.md
@@ -136,9 +136,9 @@ Diff:
"""
squash-template = """
-Combine these {{ commits | length }} commits into one message:
-{% for c in commits %}
-- {{ c }}
+Combine these {{ commit_details | length }} commits into one message:
+{% for c in commit_details %}
+- {{ c.subject }}
{% endfor %}
Diff:
@@ -155,8 +155,7 @@ Diff:
| `{{ branch }}` | Current branch name |
| `{{ repo }}` | Repository name |
| `{{ recent_commits }}` | Recent commit subjects (for style reference) |
-| `{{ commits }}` | Commit subjects being squashed (squash template only) |
-| `{{ commit_details }}` | Commits being squashed as `{ subject, body }` (squash template only) [experimental] |
+| `{{ commit_details }}` | Commits being squashed (squash template only); each renders as its subject and exposes `.subject` / `.body` |
| `{{ target_branch }}` | Merge target branch (squash template only) |
| `{{ user_guidance }}` | Rendered user `template-append` fragment (see below) |
| `{{ project_guidance }}` | Rendered project `template-append` fragment (see below) |
@@ -166,9 +165,9 @@ Diff:
Templates use [minijinja](https://docs.rs/minijinja/latest/minijinja/syntax/index.html), which supports:
- **Variables**: `{{ branch }}`, `{{ repo | upper }}`
-- **Filters**: `{{ commits | length }}`, `{{ repo | upper }}`
+- **Filters**: `{{ commit_details | length }}`, `{{ repo | upper }}`
- **Conditionals**: `{% if recent_commits %}...{% endif %}`
-- **Loops**: `{% for c in commits %}{{ c }}{% endfor %}`
+- **Loops**: `{% for c in commit_details %}{{ c.subject }}{% endfor %}`
- **Loop variables**: `{{ loop.index }}`, `{{ loop.length }}`
- **Whitespace control**: `{%- ... -%}` strips surrounding whitespace
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index 0abf68371..6c23150bd 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -1945,8 +1945,7 @@ Branch: {{ branch }}
Available variables (in addition to commit template variables):
-- `{{ commits }}` — list of commit subjects being squashed
-- `{{ commit_details }}` — [experimental] list of commits being squashed as `{ subject, body }` objects
+- `{{ commit_details }}` — list of commits being squashed; each renders as its subject and exposes `.subject` / `.body`
- `{{ target_branch }}` — merge target branch
Default template:
@@ -1978,7 +1977,7 @@ squash-template = """
</project-guidance>
{% endif %}
<commits branch="{{ branch }}" target="{{ target_branch }}">
-{% for commit in commits %}- {{ commit }}
+{% for detail in commit_details %}- {{ detail.subject }}
{% endfor %}</commits>
<diffstat>
diff --git a/src/config/deprecation.rs b/src/config/deprecation.rs
index 63dacf874..41d61a243 100644
--- a/src/config/deprecation.rs
+++ b/src/config/deprecation.rs
@@ -75,6 +75,11 @@ const DEPRECATED_VARS: &[(&str, &str)] = &[
("worktree", "worktree_path"),
("main_worktree", "repo"),
("main_worktree_path", "primary_worktree_path"),
+ // Squash-template-only. The rename is a safe mechanical rewrite because each
+ // `commit_details` element renders as its subject when printed bare, so a
+ // migrated `{% for c in commit_details %}{{ c }}` reads identically to the
+ // old `{% for c in commits %}{{ c }}` (see #2984 and `CommitDetailValue`).
+ ("commits", "commit_details"),
];
/// Metadata for a deprecated top-level section key.
diff --git a/src/llm.rs b/src/llm.rs
index d8216bd60..2590ec055 100644
--- a/src/llm.rs
+++ b/src/llm.rs
@@ -2,7 +2,9 @@ use anyhow::Context;
use color_print::cformat;
use shell_escape::unix::escape;
use std::borrow::Cow;
+use std::fmt;
use std::path::{Path, PathBuf};
+use std::sync::Arc;
use std::sync::atomic::{AtomicBool, Ordering};
use worktrunk::config::CommitGenerationConfig;
use worktrunk::git::{CommitMessageDetail, Repository};
@@ -11,6 +13,48 @@ use worktrunk::shell_exec::{Cmd, SUBPROCESS_FULL_TARGET, ShellConfig};
use worktrunk::styling::{eprintln, warning_message};
use minijinja::Environment;
+use minijinja::value::{Enumerator, Object, Value};
+
+/// minijinja view of one squashed commit, exposed to squash templates as an
+/// element of `commit_details`.
+///
+/// It renders as its bare subject (`{{ detail }}` yields the subject line) so a
+/// template that iterates the list and prints the loop variable directly
+/// behaves exactly like the deprecated `commits` list of subject strings. That
+/// equivalence is what lets `wt config update` migrate a `commits` template to
+/// `commit_details` as a plain identifier rename — no shape-changing hand edits
+/// (see #2984). The `.subject` and `.body` properties remain available for
+/// templates that want the structured form, and because minijinja coerces an
+/// object to a string via its `render`, string filters (`{{ c | upper }}`)
+/// operate on the subject too.
+#[derive(Debug)]
+struct CommitDetailValue {
+ subject: String,
+ body: String,
+}
+
+impl Object for CommitDetailValue {
+ // `repr` is left at the trait default (`ObjectRepr::Map`).
+
+ fn get_value(self: &Arc<Self>, key: &Value) -> Option<Value> {
+ match key.as_str()? {
+ "subject" => Some(Value::from(self.subject.clone())),
+ "body" => Some(Value::from(self.body.clone())),
+ _ => None,
+ }
+ }
+
+ // Report the two keys so the object is non-empty: with the default
+ // `Map`-repr enumerator (`Empty`) the object would be falsy in `{% if c %}`,
+ // breaking the equivalence with the old non-empty subject string.
+ fn enumerate(self: &Arc<Self>) -> Enumerator {
+ Enumerator::Str(&["subject", "body"])
+ }
+
+ fn render(self: &Arc<Self>, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ f.write_str(&self.subject)
+ }
+}
/// Characters that require shell wrapping when used in a command.
/// If a command contains any of these, it needs `sh -c '...'` to execute correctly.
@@ -329,7 +373,7 @@ const DEFAULT_SQUASH_TEMPLATE: &str = r#"<task>Write a commit message for the co
</project-guidance>
{% endif %}
<commits branch="{{ branch }}" target="{{ target_branch }}">
-{% for commit in commits %}- {{ commit }}
+{% for detail in commit_details %}- {{ detail.subject }}
{% endfor %}</commits>
<diffstat>
@@ -461,8 +505,10 @@ fn load_template(
/// - `repo`: Repository directory name
///
/// Squash-specific variables (empty for regular commits):
-/// - `commits`: Commit subjects being squashed
-/// - `commit_details`: Subject/body details for commits being squashed
+/// - `commit_details`: Commits being squashed. Each element renders as its
+/// subject when printed bare and exposes `.subject` / `.body` properties.
+/// - `commits`: Commit subjects being squashed (deprecated — see #2984;
+/// `wt config update` rewrites it to `commit_details`)
/// - `target_branch`: Target branch for merge
fn build_prompt(
config: &CommitGenerationConfig,
@@ -503,15 +549,34 @@ fn build_prompt(
let env = Environment::new();
let tmpl = env.template_from_str(&template)?;
- // Reverse commits so they're in chronological order (oldest first)
+ // Reverse commits so they're in chronological order (oldest first).
+ //
+ // `commits` (a list of bare subject strings) is deprecated in favor of
+ // `commit_details` (see #2984). The deprecation warning and the
+ // `wt config update` rewrite both go through the standard config
+ // deprecation framework (`DEPRECATED_VARS`), so nothing is detected or
+ // warned here — `commits` is simply still rendered for templates that
+ // haven't migrated yet. The rename is safe because each `commit_details`
+ // element renders as its subject (see `CommitDetailValue`), so a migrated
+ // `{% for c in commit_details %}{{ c }}` reads identically to the old
+ // `{% for c in commits %}{{ c }}`.
let commits_chronological: Vec<&String> = context
.commit_details
.iter()
.rev()
.map(|detail| &detail.subject)
.collect();
- let commit_details_chronological: Vec<&CommitMessageDetail> =
- context.commit_details.iter().rev().collect();
+ let commit_details_chronological: Vec<Value> = context
+ .commit_details
+ .iter()
+ .rev()
+ .map(|detail| {
+ Value::from_object(CommitDetailValue {
+ subject: detail.subject.clone(),
+ body: detail.body.clone(),
+ })
+ })
+ .collect();
let empty_commits: Vec<String> = vec![];
// The append fragments are themselves minijinja templates. Render each
@@ -934,6 +999,49 @@ mod tests {
);
}
+ /// Render a one-off template with a single `CommitDetailValue` bound to `c`.
+ fn render_with_detail(template: &str, subject: &str, body: &str) -> String {
+ let env = Environment::new();
+ let detail = Value::from_object(CommitDetailValue {
+ subject: subject.to_string(),
+ body: body.to_string(),
+ });
+ env.template_from_str(template)
+ .unwrap()
+ .render(minijinja::context! { c => detail })
+ .unwrap()
+ }
+
+ /// A `commit_details` element renders as its bare subject and exposes
+ /// `.subject` / `.body`. This is the equivalence that lets the
+ /// `commits` → `commit_details` rename be a mechanical identifier rewrite
+ /// (see #2984 and `CommitDetailValue`).
+ #[test]
+ fn test_commit_detail_value_render_and_properties() {
+ assert_eq!(render_with_detail("{{ c }}", "Add a", "body a"), "Add a");
+ assert_eq!(
+ render_with_detail("{{ c.subject }}|{{ c.body }}", "Add a", "body a"),
+ "Add a|body a"
+ );
+ }
+
+ /// An unknown attribute resolves to undefined (renders empty), exercising the
+ /// catch-all in `get_value`. A bare `{% if c %}` is truthy because
+ /// `enumerate` reports two keys — without that override a `Map`-repr object
+ /// defaults to an empty enumerator and would read as falsy, diverging from
+ /// the old non-empty subject string.
+ #[test]
+ fn test_commit_detail_value_unknown_key_and_truthiness() {
+ assert_eq!(
+ render_with_detail("[{{ c.nope }}]", "Add a", "body a"),
+ "[]"
+ );
+ assert_eq!(
+ render_with_detail("{% if c %}yes{% else %}no{% endif %}", "Add a", "body a"),
+ "yes"
+ );
+ }
+
/// Helper to create a commit context (no squash-specific fields)
fn commit_context<'a>(
git_diff: &'a str,
diff --git a/tests/integration_tests/config_show.rs b/tests/integration_tests/config_show.rs
index 5c46fa0f9..fef22685e 100644
--- a/tests/integration_tests/config_show.rs
+++ b/tests/integration_tests/config_show.rs
@@ -3384,6 +3384,53 @@ pre-start = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules"
);
}
+/// `wt config update` migrates the deprecated `commits` squash-template
+/// variable to `commit_details` (see #2984). The rewrite is a plain identifier
+/// rename — the loop variable stays bare — because each `commit_details`
+/// element renders as its subject, so the migrated template renders identically
+/// to the original.
+#[rstest]
+fn test_config_update_migrates_commits_squash_var(repo: TestRepo) {
+ let config_path = repo.test_config_path();
+ fs::write(
+ config_path,
+ r#"[commit.generation]
+squash-template = """
+Combine {{ commits | length }} commits:
+{% for c in commits %}- {{ c }}
+{% endfor %}"""
+"#,
+ )
+ .unwrap();
+
+ let output = repo
+ .wt_command()
+ .args(["config", "update", "--yes"])
+ .output()
+ .unwrap();
+ assert!(output.status.success());
+
+ let updated = fs::read_to_string(config_path).unwrap();
+ assert!(
+ updated.contains("{{ commit_details | length }}"),
+ "filter use of commits should migrate: {updated}"
+ );
+ assert!(
+ updated.contains("for c in commit_details"),
+ "loop source should migrate: {updated}"
+ );
+ // The loop variable stays bare — no `.subject` is injected, since the
+ // element renders as its subject on its own.
+ assert!(
+ updated.contains("- {{ c }}"),
+ "loop body should be left untouched: {updated}"
+ );
+ assert!(
+ !updated.contains("{{ commits"),
+ "no deprecated commits reference should remain: {updated}"
+ );
+}
+
/// `wt config show` displays deprecation details for `[select]` → `[switch.picker]`.
/// Uses user config so the warning label reads "User config".
#[rstest]
diff --git a/tests/integration_tests/merge.rs b/tests/integration_tests/merge.rs
index d8d2ab678..70d5efb08 100644
--- a/tests/integration_tests/merge.rs
+++ b/tests/integration_tests/merge.rs
@@ -2553,6 +2553,61 @@ Combine these {{ commit_details | length }} commits into one message:
));
}
+/// Each `commit_details` element renders as its subject when printed bare, so a
+/// template iterating the list and printing the loop variable directly produces
+/// the same output as the old `commits` list of strings. This is what makes the
+/// `commits` → `commit_details` migration a mechanical rename (see #2984).
+#[rstest]
+fn test_step_squash_show_prompt_commit_details_renders_subject_bare(mut repo: TestRepo) {
+ let feature_wt = repo.add_worktree("feature");
+
+ repo.commit_in_worktree(&feature_wt, "a.txt", "a\n", "Add a");
+ repo.commit_in_worktree(&feature_wt, "b.txt", "b\n", "Add b");
+
+ let worktrunk_config = r#"
+[commit.generation]
+squash-template = """
+<subjects>
+{% for c in commit_details %}- {{ c }}
+{% endfor -%}
+</subjects>"""
+"#;
+ fs::write(repo.test_config_path(), worktrunk_config).unwrap();
+
+ assert_cmd_snapshot!(make_snapshot_cmd(
+ &repo,
+ "step",
+ &["squash", "--show-prompt"],
+ Some(&feature_wt),
+ ));
+}
+
+/// A custom squash template that references the deprecated `commits` variable
+/// still renders, and the standard config-deprecation framework warns that it
+/// is replaced by `commit_details` and points at `wt config update` to apply
+/// the rewrite (see #2984). The rename is mechanical because each
+/// `commit_details` element renders as its subject when printed bare.
+#[rstest]
+fn test_step_squash_show_prompt_deprecated_commits_warns(mut repo: TestRepo) {
+ let feature_wt = repo.add_worktree("feature");
+
+ repo.commit_in_worktree(&feature_wt, "a.txt", "a\n", "Add a");
+ repo.commit_in_worktree(&feature_wt, "b.txt", "b\n", "Add b");
+
+ let worktrunk_config = r#"
+[commit.generation]
+squash-template = "Squashing {{ commits | length }} commits from {{ branch }}"
+"#;
+ fs::write(repo.test_config_path(), worktrunk_config).unwrap();
+
+ assert_cmd_snapshot!(make_snapshot_cmd(
+ &repo,
+ "step",
+ &["squash", "--show-prompt"],
+ Some(&feature_wt),
+ ));
+}
+
// =============================================================================
// --dry-run tests
// =============================================================================
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_create.snap b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
index 25747c062..8ffffacc3 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
@@ -314,8 +314,7 @@ Creates ~/.config/worktrunk/config.toml with the following content:
  #
  # Available variables (in addition to commit template variables):
  #
-  # - `{{ commits }}` — list of commit subjects being squashed
-  # - `{{ commit_details }}` — [experimental] list of commits being squashed as `{ subject, body }` objects
+  # - `{{ commit_details }}` — list of commits being squashed; each renders as its subject and exposes `.subject` / `.body`
  # - `{{ target_branch }}` — merge target branch
  #
  # Default template:
@@ -346,7 +345,7 @@ Creates ~/.config/worktrunk/config.toml with the following content:
  # </project-guidance>
  # {% endif %}
  # <commits branch="{{ branch }}" target="{{ target_branch }}">
-  # {% for commit in commits %}- {{ commit }}
+  # {% for detail in commit_details %}- {{ detail.subject }}
  # {% endfor %}</commits>
  #
  # <diffstat>
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_long.snap b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
index f9ba30f12..712ab47ee 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
@@ -360,8 +360,7 @@ Default template:
Available variables (in addition to commit template variables):
-- {{ commits }} — list of commit subjects being squashed
-- {{ commit_details }} — [experimental] list of commits being squashed as { subject, body } objects
+- {{ commit_details }} — list of commits being squashed; each renders as its subject and exposes .subject / .body
- {{ target_branch }} — merge target branch
Default template:
@@ -391,7 +390,7 @@ Default template:
  </project-guidance>
  {% endif %}
  <commits branch="{{ branch }}" target="{{ target_branch }}">
-  {% for commit in commits %}- {{ commit }}
+  {% for detail in commit_details %}- {{ detail.subject }}
  {% endfor %}</commits>
 
  <diffstat>
diff --git a/tests/snapshots/integration__integration_tests__merge__step_squash_show_prompt_commit_details_renders_subject_bare.snap b/tests/snapshots/integration__integration_tests__merge__step_squash_show_prompt_commit_details_renders_subject_bare.snap
new file mode 100644
index 000000000..c99e7494d
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__merge__step_squash_show_prompt_commit_details_renders_subject_bare.snap
@@ -0,0 +1,62 @@
+---
+source: tests/integration_tests/merge.rs
+info:
+ program: wt
+ args:
+ - step
+ - squash
+ - "--show-prompt"
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMON_DIR: ""
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_DIR: ""
+ GIT_EDITOR: ""
+ GIT_INDEX_FILE: ""
+ GIT_OBJECT_DIRECTORY: ""
+ GIT_TERMINAL_PROMPT: "0"
+ GIT_WORK_TREE: ""
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
+ NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PATH: "[PATH]"
+ PSModulePath: ""
+ SHELL: ""
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_BASH_INSTALLED: "0"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_INSTALLED: "0"
+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+<subjects>
+- Add a
+- Add b
+</subjects>
+
+----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__step_squash_show_prompt_deprecated_commits_warns.snap b/tests/snapshots/integration__integration_tests__merge__step_squash_show_prompt_deprecated_commits_warns.snap
new file mode 100644
index 000000000..d0a4b9147
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__merge__step_squash_show_prompt_deprecated_commits_warns.snap
@@ -0,0 +1,61 @@
+---
+source: tests/integration_tests/merge.rs
+info:
+ program: wt
+ args:
+ - step
+ - squash
+ - "--show-prompt"
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMON_DIR: ""
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_DIR: ""
+ GIT_EDITOR: ""
+ GIT_INDEX_FILE: ""
+ GIT_OBJECT_DIRECTORY: ""
+ GIT_TERMINAL_PROMPT: "0"
+ GIT_WORK_TREE: ""
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
+ NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PATH: "[PATH]"
+ PSModulePath: ""
+ SHELL: ""
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_BASH_INSTALLED: "0"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_INSTALLED: "0"
+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+Squashing 2 commits from feature
+
+----- stderr -----
+▲ User config: template variable commits is deprecated in favor of commit_details
+↳ To see details, run wt config show; to apply updates, run wt config update