Skip to content

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

refactor: simplify deprecation migration file logic (#841)

Maximilian Roosf8b06085255c
diff --git a/src/config/deprecation.rs b/src/config/deprecation.rs
index fb81f0dfb..f34c27e7a 100644
--- a/src/config/deprecation.rs
+++ b/src/config/deprecation.rs
@@ -5,13 +5,14 @@
//! - Deprecated config sections ([commit-generation] → [commit.generation])
//! - Deprecated fields (args merged into command)
//!
-//! Migration files are only written once per config file. The hint system tracks
-//! whether a migration file has been written:
-//! - Project config: uses `worktrunk.hints.deprecated-config` in git config
-//! - User config: checks if the `.new` file already exists (no repo context)
+//! Migration file write behavior:
+//! - First time a deprecation is detected: file is written automatically
+//! - Subsequent runs (for commands other than `wt config show`): brief warning only
+//! - `wt config show`: always writes/regenerates the migration file with full details
//!
-//! To regenerate a project config migration file, run `wt config state hints clear deprecated-config`.
-//! To regenerate a user config migration file, delete the existing `.new` file.
+//! The hint system (`worktrunk.hints.deprecated-config` in git config) tracks whether
+//! a deprecation has been warned about before. User config (no repo context) always
+//! writes the migration file since there's no persistent hint tracking.
use std::borrow::Cow;
use std::collections::{HashMap, HashSet};
@@ -27,7 +28,8 @@ use shell_escape::unix::escape;
use crate::config::WorktrunkConfig;
use crate::shell_exec::Cmd;
use crate::styling::{
- eprintln, format_bash_with_gutter, format_with_gutter, hint_message, warning_message,
+ eprintln, format_bash_with_gutter, format_with_gutter, hint_message, info_message,
+ warning_message,
};
/// Tracks which config paths have already shown deprecation warnings this process.
@@ -407,8 +409,6 @@ pub struct DeprecationInfo {
pub commit_gen_deprecations: CommitGenerationDeprecations,
/// Label for this config (e.g., "User config", "Project config")
pub label: String,
- /// True if user deleted the migration file (show regenerate hint)
- pub user_deleted_migration: bool,
/// True if in a linked worktree (migration file written to main worktree only)
pub in_linked_worktree: bool,
}
@@ -462,6 +462,14 @@ pub fn check_and_migrate(
let has_commit_gen_deprecations = !commit_gen_deprecations.is_empty();
if !has_deprecated_vars && !has_commit_gen_deprecations {
+ // Config is clean - clear hint so future deprecations get full treatment.
+ // This handles the case where a user fixes their config today, then months
+ // later a new deprecation is introduced - they should get the full warning.
+ // TODO: We want to avoid gunking up config loading with too many checks,
+ // but a single git config --unset seems acceptable for now.
+ if let Some(repo) = repo {
+ let _ = repo.clear_hint(HINT_DEPRECATED_CONFIG);
+ }
return Ok(None);
}
@@ -471,12 +479,11 @@ pub fn check_and_migrate(
path.extension().unwrap_or_default().to_string_lossy()
));
- // Check if we should skip writing the migration file
- // - Always regenerate if .new file exists (user kept it, so overwrite with fresh version)
- // - For project config: skip if hint shown AND .new doesn't exist (user deleted it)
- // - For user config: always write (no persistent hint tracking without repo)
- let should_skip_write =
- !new_path.exists() && repo.is_some_and(|r| r.has_shown_hint(HINT_DEPRECATED_CONFIG));
+ // Skip writing if: (a) this is a brief warning (not `wt config show`), AND
+ // (b) migration file already exists
+ // This means first-time deprecation gets automatic file write, after that
+ // users run `wt config show` to get/update the migration file.
+ let should_skip_write = show_brief_warning && new_path.exists();
// Build deprecation info for return
let mut info = DeprecationInfo {
@@ -485,7 +492,6 @@ pub fn check_and_migrate(
deprecated_vars: deprecated_vars.clone(),
commit_gen_deprecations: commit_gen_deprecations.clone(),
label: label.to_string(),
- user_deleted_migration: should_skip_write,
in_linked_worktree: !warn_and_migrate,
};
@@ -513,7 +519,7 @@ pub fn check_and_migrate(
eprintln!(
"{}",
warning_message(cformat!(
- "{} has deprecated settings. To see details, run <bright-black>wt config show</>",
+ "{} has deprecated settings. To see details, run <bold>wt config show</>",
label
))
);
@@ -642,9 +648,10 @@ pub fn format_migration_diff(original_path: &Path, new_path: &Path) -> Option<St
let path_str = original_path.to_string_lossy().replace('\\', "/");
// Run git diff and return the formatted output
+ // -U3: Show 3 lines of context (git default)
// Use -- to separate options from file paths (guards against filenames starting with -)
if let Ok(output) = Cmd::new("git")
- .args(["diff", "--no-index", "--color=always", "--"])
+ .args(["diff", "--no-index", "--color=always", "-U3", "--"])
.arg(&path_str)
.arg(&new_path_str)
.run()
@@ -731,8 +738,9 @@ pub fn format_deprecation_details(info: &DeprecationInfo) -> String {
format_bash_with_gutter(&format!("mv -- {} {}", new_path_str, path_str))
);
- // Inline diff
+ // Inline diff with intro
if let Some(diff) = format_migration_diff(&info.config_path, new_path) {
+ let _ = writeln!(out, "{}", info_message("Diff:"));
let _ = writeln!(out, "{}", diff);
}
} else if info.in_linked_worktree {
@@ -744,16 +752,6 @@ pub fn format_deprecation_details(info: &DeprecationInfo) -> String {
"To generate migration file, run <bright-black>wt config show</> from main worktree",
))
);
- } else if info.user_deleted_migration {
- // User deleted the migration file - show how to regenerate
- let _ = writeln!(
- out,
- "{}",
- hint_message(cformat!(
- "To regenerate migration file, run <bright-black>wt config state hints clear {}</>",
- HINT_DEPRECATED_CONFIG
- ))
- );
}
out
diff --git a/src/config/user.rs b/src/config/user.rs
index 51e836426..d1a4994c4 100644
--- a/src/config/user.rs
+++ b/src/config/user.rs
@@ -652,8 +652,8 @@ impl UserConfig {
{
// Check for deprecated template variables and create migration file if needed
// User config always gets migration file (it's global, not worktree-specific)
- // Pass None for repo since user config is global and not tied to any repository
// Use show_brief_warning=true to emit a brief pointer to `wt config show`
+ // Warning is deduplicated per-process via WARNED_DEPRECATED_PATHS.
if let Ok(content) = std::fs::read_to_string(config_path) {
let _ = super::deprecation::check_and_migrate(
config_path,
diff --git a/tests/integration_tests/config_show.rs b/tests/integration_tests/config_show.rs
index b9f46e722..7a2d2f6bc 100644
--- a/tests/integration_tests/config_show.rs
+++ b/tests/integration_tests/config_show.rs
@@ -864,10 +864,11 @@ post-create = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules"
});
}
-/// When a migration file has already been written, subsequent commands should:
-/// 1. Still show the deprecation warning
-/// 2. NOT overwrite the migration file
-/// 3. Show a hint about how to regenerate the migration file
+/// When a migration file has already been written, subsequent `wt list` runs should:
+/// 1. Still show a brief deprecation warning
+/// 2. NOT write or overwrite the migration file (skip write since hint is set)
+///
+/// The file remains available for the user. If they want a fresh one, `wt config show` regenerates.
#[rstest]
fn test_deprecated_template_variables_hint_deduplication(repo: TestRepo, temp_home: TempDir) {
// Write project config with deprecated variables
@@ -904,8 +905,7 @@ fn test_deprecated_template_variables_hint_deduplication(repo: TestRepo, temp_ho
let original_content = fs::read_to_string(&migration_file).unwrap();
- // Second run - if .new exists, we always regenerate (overwrite)
- // This ensures users always have a fresh migration file
+ // Second run - hint is set, so wt list shows brief warning and skips writing
{
let mut cmd = repo.wt_command();
cmd.arg("list").current_dir(repo.root_path());
@@ -918,22 +918,31 @@ fn test_deprecated_template_variables_hint_deduplication(repo: TestRepo, temp_ho
stderr
);
assert!(
- stderr.contains("Wrote migrated"),
- "Second run should regenerate migration file, got: {stderr}"
+ stderr.contains("deprecated settings"),
+ "Second run should show brief warning, got: {stderr}"
+ );
+ assert!(
+ !stderr.contains("Wrote migrated"),
+ "Second run should NOT write migration file (hint is set), got: {stderr}"
);
}
- // Content should be the same (same input produces same output)
+ // Content should be unchanged (wt list didn't touch it)
let current_content = fs::read_to_string(&migration_file).unwrap();
assert_eq!(
original_content, current_content,
- "Regenerated content should be the same"
+ "Migration file should be unchanged by second wt list run"
);
}
-/// This tests the skip-write path for project config
+/// This tests the skip-write path for project config with non-config-show commands.
+///
+/// Migration file write is deduplicated based on file existence:
+/// - First run: file doesn't exist → write it
+/// - Second run: file exists → skip write, show brief warning only
+/// Users can run `wt config show` to force regeneration.
#[rstest]
-fn test_deprecated_config_deleted_shows_regenerate_hint(repo: TestRepo, temp_home: TempDir) {
+fn test_wt_list_skips_migration_file_after_first_write(repo: TestRepo, temp_home: TempDir) {
// Write project config with deprecated variables
// Use deprecated variable main_worktree (should be repo) in a valid project config field
let project_config_dir = repo.root_path().join(".config");
@@ -946,7 +955,7 @@ fn test_deprecated_config_deleted_shows_regenerate_hint(repo: TestRepo, temp_hom
)
.unwrap();
- // First run - creates migration file and sets hint
+ // First run - creates migration file
{
let mut cmd = repo.wt_command();
cmd.arg("list").current_dir(repo.root_path());
@@ -962,10 +971,7 @@ fn test_deprecated_config_deleted_shows_regenerate_hint(repo: TestRepo, temp_hom
let migration_file = project_config_path.with_extension("toml.new");
assert!(migration_file.exists());
- // Delete the migration file (user doesn't want it)
- fs::remove_file(&migration_file).unwrap();
-
- // Second run - .new doesn't exist but hint is set → skip write, show clear hint
+ // Second run - file exists → skip write, show brief warning only
let settings = setup_snapshot_settings_with_home(&repo, &temp_home);
settings.bind(|| {
let mut cmd = wt_command();
@@ -976,15 +982,16 @@ fn test_deprecated_config_deleted_shows_regenerate_hint(repo: TestRepo, temp_hom
assert_cmd_snapshot!(cmd);
});
- // Migration file should NOT exist (we skipped writing)
+ // Migration file still exists (not deleted or overwritten)
assert!(
- !migration_file.exists(),
- "Migration file should not be recreated when hint is set"
+ migration_file.exists(),
+ "Migration file should still exist after second run"
);
}
+/// Migration file is regenerated when deleted (file-existence based deduplication).
#[rstest]
-fn test_deprecated_variables_hint_clear_regenerates(repo: TestRepo, temp_home: TempDir) {
+fn test_deleted_migration_file_regenerated(repo: TestRepo, temp_home: TempDir) {
// Write project config with deprecated variables
let project_config_dir = repo.root_path().join(".config");
fs::create_dir_all(&project_config_dir).unwrap();
@@ -996,7 +1003,7 @@ fn test_deprecated_variables_hint_clear_regenerates(repo: TestRepo, temp_home: T
)
.unwrap();
- // First run - creates migration file and sets hint
+ // First run - creates migration file
{
let mut cmd = repo.wt_command();
cmd.arg("list").current_dir(repo.root_path());
@@ -1015,42 +1022,118 @@ fn test_deprecated_variables_hint_clear_regenerates(repo: TestRepo, temp_home: T
// Delete the migration file to simulate user having applied and removed it
fs::remove_file(&migration_file).unwrap();
- // Clear the hint
+ // Second run - should recreate migration file since it doesn't exist
{
let mut cmd = repo.wt_command();
- cmd.args(["config", "state", "hints", "clear", "deprecated-config"])
- .current_dir(repo.root_path());
+ cmd.arg("list").current_dir(repo.root_path());
set_temp_home_env(&mut cmd, temp_home.path());
let output = cmd.output().unwrap();
assert!(
output.status.success(),
- "Hint clear should succeed: {:?}",
+ "Second run should succeed: {:?}",
String::from_utf8_lossy(&output.stderr)
);
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ assert!(
+ stderr.contains("Wrote migrated"),
+ "Should write migration file when it doesn't exist, got: {stderr}"
+ );
}
- // Third run - should create migration file again
+ // Migration file should exist again
+ assert!(
+ migration_file.exists(),
+ "Migration file should be regenerated after deletion"
+ );
+}
+
+/// When a user fixes their deprecated config, the hint should be cleared automatically.
+/// This ensures that future deprecations (introduced months later) get full treatment.
+#[rstest]
+fn test_fixing_deprecated_config_clears_hint_for_future_deprecations(
+ repo: TestRepo,
+ temp_home: TempDir,
+) {
+ // Write project config with deprecated variable
+ let project_config_dir = repo.root_path().join(".config");
+ fs::create_dir_all(&project_config_dir).unwrap();
+ let project_config_path = project_config_dir.join("wt.toml");
+ fs::write(
+ &project_config_path,
+ r#"post-create = "ln -sf {{ main_worktree }}/node_modules"
+"#,
+ )
+ .unwrap();
+
+ // First run - creates migration file and sets hint
{
let mut cmd = repo.wt_command();
cmd.arg("list").current_dir(repo.root_path());
set_temp_home_env(&mut cmd, temp_home.path());
let output = cmd.output().unwrap();
+ assert!(output.status.success());
+ let stderr = String::from_utf8_lossy(&output.stderr);
assert!(
- output.status.success(),
- "Third run should succeed: {:?}",
- String::from_utf8_lossy(&output.stderr)
+ stderr.contains("Wrote migrated"),
+ "First run should write migration file"
);
+ }
+
+ // User fixes the config (removes deprecation)
+ fs::write(
+ &project_config_path,
+ r#"post-create = "ln -sf {{ repo }}/node_modules"
+"#,
+ )
+ .unwrap();
+
+ // Clean up migration file
+ let migration_file = project_config_path.with_extension("toml.new");
+ if migration_file.exists() {
+ fs::remove_file(&migration_file).unwrap();
+ }
+
+ // Second run with fixed config - hint should be cleared
+ {
+ let mut cmd = repo.wt_command();
+ cmd.arg("list").current_dir(repo.root_path());
+ set_temp_home_env(&mut cmd, temp_home.path());
+ let output = cmd.output().unwrap();
+ assert!(output.status.success());
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ assert!(
+ !stderr.contains("deprecated"),
+ "No deprecation warning for fixed config"
+ );
+ }
+
+ // Months later, a NEW deprecation is introduced - user adds a different deprecated variable
+ fs::write(
+ &project_config_path,
+ r#"post-create = "cd {{ worktree }} && npm install"
+"#,
+ )
+ .unwrap();
+
+ // Third run with new deprecation - should get FULL warning (not just brief)
+ // because hint was cleared when config was clean
+ {
+ let mut cmd = repo.wt_command();
+ cmd.arg("list").current_dir(repo.root_path());
+ set_temp_home_env(&mut cmd, temp_home.path());
+ let output = cmd.output().unwrap();
+ assert!(output.status.success());
let stderr = String::from_utf8_lossy(&output.stderr);
assert!(
stderr.contains("Wrote migrated"),
- "After clearing hint, should write migration file again, got: {stderr}"
+ "New deprecation should get full treatment with file write, got: {stderr}"
);
}
- // Migration file should exist again
+ // Migration file should exist for the new deprecation
assert!(
migration_file.exists(),
- "Migration file should be regenerated after clearing hint"
+ "Migration file should be created for new deprecation"
);
}
@@ -1113,9 +1196,9 @@ fn test_deprecated_project_config_silent_in_feature_worktree(repo: TestRepo, tem
}
}
-/// User config has no repo context, so hint deduplication is based on file existence.
-/// When the .new file already exists, subsequent runs should show a hint about deleting
-/// the file to regenerate (not about clearing a git config hint).
+/// User config migration file write is deduplicated based on file existence.
+/// First run creates the migration file. Subsequent runs skip the write
+/// if the file already exists (brief warning only, pointing to `wt config show`).
#[rstest]
fn test_user_config_deprecated_variables_deduplication(repo: TestRepo, temp_home: TempDir) {
// Write user config with deprecated variables using the test config path
@@ -1147,8 +1230,8 @@ fn test_user_config_deprecated_variables_deduplication(repo: TestRepo, temp_home
let migration_file = user_config_path.with_extension("toml.new");
assert!(migration_file.exists());
- // Second run - user config always regenerates (overwrites .new file)
- // Should still show "Wrote migrated" since we overwrite existing .new files
+ // Second run - hint is already marked shown, skip file write
+ // Should show brief warning only, NOT regenerate the file
{
let mut cmd = repo.wt_command();
cmd.arg("list").current_dir(repo.root_path());
@@ -1160,13 +1243,18 @@ fn test_user_config_deprecated_variables_deduplication(repo: TestRepo, temp_home
"Second run should succeed: {:?}",
stderr
);
+ // Should show brief warning (deprecated settings) but NOT write file
assert!(
- stderr.contains("Wrote migrated"),
- "Second run should regenerate migration file, got: {stderr}"
+ stderr.contains("User config has deprecated settings"),
+ "Second run should show brief warning, got: {stderr}"
+ );
+ assert!(
+ !stderr.contains("Wrote migrated"),
+ "Second run should NOT regenerate migration file (hint already shown), got: {stderr}"
);
}
- // Verify migration file still exists
+ // Verify migration file still exists (from first run)
assert!(migration_file.exists());
}
@@ -1429,15 +1517,12 @@ post-create = "ln -sf {{ repo_root }}/node_modules"
);
}
-/// Test that `wt config show` shows regenerate hint when user deleted migration file
+/// Test that `wt config show` always regenerates migration file
///
-/// When the hint is set but migration file doesn't exist, `wt config show` should
-/// show how to regenerate it (via `wt config state hints clear deprecated-config`).
+/// Even if the user deleted the migration file previously, `wt config show`
+/// should always regenerate it (unlike other commands which skip after first write).
#[rstest]
-fn test_config_show_user_deleted_migration_shows_regenerate_hint(
- mut repo: TestRepo,
- temp_home: TempDir,
-) {
+fn test_config_show_always_regenerates_migration_file(mut repo: TestRepo, temp_home: TempDir) {
// Setup mock gh/glab/claude for deterministic output
repo.setup_mock_ci_tools_unauthenticated();
@@ -1468,10 +1553,10 @@ fn test_config_show_user_deleted_migration_shows_regenerate_hint(
let migration_file = project_config_path.with_extension("toml.new");
assert!(migration_file.exists(), "Migration file should be created");
- // Delete the migration file (simulating user doesn't want it)
+ // Delete the migration file (simulating user applied it or doesn't want it)
fs::remove_file(&migration_file).unwrap();
- // Run wt config show - should show regenerate hint
+ // Run wt config show - should regenerate migration file
let settings = setup_snapshot_settings_with_home(&repo, &temp_home);
settings.bind(|| {
let mut cmd = wt_command();
@@ -1483,10 +1568,17 @@ fn test_config_show_user_deleted_migration_shows_regenerate_hint(
assert_cmd_snapshot!(cmd);
});
- // Migration file should NOT be recreated (hint is set)
+ // Migration file SHOULD be regenerated by wt config show
assert!(
- !migration_file.exists(),
- "Migration file should not be recreated when hint is set"
+ migration_file.exists(),
+ "Migration file should be regenerated by wt config show"
+ );
+
+ // Verify the regenerated file has the correct content
+ let migrated_content = fs::read_to_string(&migration_file).unwrap();
+ assert!(
+ migrated_content.contains("{{ repo }}"),
+ "Migration should replace main_worktree with repo"
);
}
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_user_deleted_migration_shows_regenerate_hint.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_always_regenerates_migration_file.snap
similarity index 74%
rename from tests/snapshots/integration__integration_tests__config_show__config_show_user_deleted_migration_shows_regenerate_hint.snap
rename to tests/snapshots/integration__integration_tests__config_show__config_show_always_regenerates_migration_file.snap
index e51652c72..47bd502b2 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_user_deleted_migration_shows_regenerate_hint.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_always_regenerates_migration_file.snap
@@ -40,7 +40,16 @@ exit_code: 0
PROJECT CONFIG _REPO_/.config/wt.toml
▲ Project config uses deprecated template variables: main_worktree → repo
-↳ To regenerate migration file, run wt config state hints clear deprecated-config
+↳ Wrote migrated wt.toml.new. To apply:
+  mv -- _REPO_/.config/wt.toml.new _REPO_/.config/wt.toml
+○ Diff:
+  diff --git a_REPO_/.config/wt.toml b_REPO_/.config/wt.toml.new
+  index 8fcdb47..42cb136 100644
+  --- a_REPO_/.config/wt.toml
+  +++ b_REPO_/.config/wt.toml.new
+  @@ -1 +1 @@
+  -post-create = "ln -sf {{ main_worktree }}/node_modules"
+  +post-create = "ln -sf {{ repo }}/node_modules"
  post-create = "ln -sf {{ main_worktree }}/node_modules"
SHELL INTEGRATION
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap
index 41c7cad1e..3acad3d7d 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap
@@ -39,6 +39,7 @@ exit_code: 0
▲ User config uses deprecated template variables: repo_root → repo_path, main_worktree → repo
↳ Wrote migrated config.toml.new. To apply:
  mv -- [TEMP_HOME]/.config/worktrunk/config.toml.new [TEMP_HOME]/.config/worktrunk/config.toml
+○ Diff:
  diff --git a[TEMP_HOME]/.config/worktrunk/config.toml b[TEMP_HOME]/.config/worktrunk/config.toml.new
  index d95d100..ceb381d 100644
  --- a[TEMP_HOME]/.config/worktrunk/config.toml
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snap
index 9dcdfd225..0d2b45899 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snap
@@ -39,6 +39,7 @@ exit_code: 0
▲ User config uses deprecated config sections: [projects."github.com/example/repo".commit-generation] → [projects."github.com/example/repo".commit.generation]
↳ Wrote migrated config.toml.new. To apply:
  mv -- [TEMP_HOME]/.config/worktrunk/config.toml.new [TEMP_HOME]/.config/worktrunk/config.toml
+○ Diff:
  diff --git a[TEMP_HOME]/.config/worktrunk/config.toml b[TEMP_HOME]/.config/worktrunk/config.toml.new
  index de80729..131a2fd 100644
  --- a[TEMP_HOME]/.config/worktrunk/config.toml
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap
index dbb318338..da9bfb53e 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap
@@ -42,6 +42,7 @@ exit_code: 0
▲ Project config uses deprecated config sections: [commit-generation] → [commit.generation]
↳ Wrote migrated wt.toml.new. To apply:
  mv -- _REPO_/.config/wt.toml.new _REPO_/.config/wt.toml
+○ Diff:
  diff --git a_REPO_/.config/wt.toml b_REPO_/.config/wt.toml.new
  index 074c30f..bcaf404 100644
  --- a_REPO_/.config/wt.toml
diff --git a/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_project_level_shows_warning.snap b/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_project_level_shows_warning.snap
index fb8354677..3ef75aa33 100644
--- a/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_project_level_shows_warning.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_project_level_shows_warning.snap
@@ -41,6 +41,6 @@ exit_code: 0
○ Showing 4 worktrees, 3 ahead
----- stderr -----
-▲ User config has deprecated settings. To see details, run wt config show
+▲ User config has deprecated settings. To see details, run wt config show
↳ Wrote migrated test-config.toml.new. To apply:
  mv -- [TEST_CONFIG_NEW] [TEST_CONFIG]
diff --git a/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_section_shows_warning.snap b/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_section_shows_warning.snap
index fb8354677..3ef75aa33 100644
--- a/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_section_shows_warning.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_section_shows_warning.snap
@@ -41,6 +41,6 @@ exit_code: 0
○ Showing 4 worktrees, 3 ahead
----- stderr -----
-▲ User config has deprecated settings. To see details, run wt config show
+▲ User config has deprecated settings. To see details, run wt config show
↳ Wrote migrated test-config.toml.new. To apply:
  mv -- [TEST_CONFIG_NEW] [TEST_CONFIG]
diff --git a/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_show_warning.snap b/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_show_warning.snap
index fb8354677..3ef75aa33 100644
--- a/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_show_warning.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_show_warning.snap
@@ -41,6 +41,6 @@ exit_code: 0
○ Showing 4 worktrees, 3 ahead
----- stderr -----
-▲ User config has deprecated settings. To see details, run wt config show
+▲ User config has deprecated settings. To see details, run wt config show
↳ Wrote migrated test-config.toml.new. To apply:
  mv -- [TEST_CONFIG_NEW] [TEST_CONFIG]
diff --git a/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_verbose_shows_content.snap b/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_verbose_shows_content.snap
index c969e338c..2cdf89226 100644
--- a/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_verbose_shows_content.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_verbose_shows_content.snap
@@ -42,7 +42,7 @@ exit_code: 0
○ Showing 4 worktrees, 3 ahead
----- stderr -----
-▲ User config has deprecated settings. To see details, run wt config show
+▲ User config has deprecated settings. To see details, run wt config show
↳ Wrote migrated test-config.toml.new. To apply:
  mv -- [TEST_CONFIG_NEW] [TEST_CONFIG]
○ Expanding worktree-path
diff --git a/tests/snapshots/integration__integration_tests__config_show__deprecated_config_deleted_shows_regenerate_hint.snap b/tests/snapshots/integration__integration_tests__config_show__wt_list_skips_migration_file_after_first_write.snap
similarity index 97%
rename from tests/snapshots/integration__integration_tests__config_show__deprecated_config_deleted_shows_regenerate_hint.snap
rename to tests/snapshots/integration__integration_tests__config_show__wt_list_skips_migration_file_after_first_write.snap
index 8f69c4f04..b1102cd18 100644
--- a/tests/snapshots/integration__integration_tests__config_show__deprecated_config_deleted_shows_regenerate_hint.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__wt_list_skips_migration_file_after_first_write.snap
@@ -41,4 +41,4 @@ exit_code: 0
○ Showing 4 worktrees, 1 with changes, 3 ahead
----- stderr -----
-▲ Project config has deprecated settings. To see details, run wt config show
+▲ Project config has deprecated settings. To see details, run wt config show