Skip to content

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

fix(output): bold identifiers in skipped/squash/path messages (#2661)

Maximilian Roos302575894a01
diff --git a/src/commands/config/update.rs b/src/commands/config/update.rs
index cee789a4f..759824d38 100644
--- a/src/commands/config/update.rs
+++ b/src/commands/config/update.rs
@@ -8,6 +8,7 @@ use std::fmt::Write as _;
use std::path::PathBuf;
use anyhow::Context;
+use color_print::cformat;
use worktrunk::config::{
DeprecationInfo, compute_migrated_content, config_path,
copy_approved_commands_to_approvals_file, format_deprecation_warnings, format_migration_diff,
@@ -100,7 +101,7 @@ pub fn handle_config_update(yes: bool, print: bool) -> anyhow::Result<()> {
.unwrap_or_default();
eprintln!(
"{}",
- info_message(format!("Copied approved commands to {filename}"))
+ info_message(cformat!("Copied approved commands to <bold>{filename}</>"))
);
}
diff --git a/src/commands/step/prune.rs b/src/commands/step/prune.rs
index e476a2a91..0427b6704 100644
--- a/src/commands/step/prune.rs
+++ b/src/commands/step/prune.rs
@@ -355,7 +355,11 @@ fn render_dry_run(
// Sort for deterministic output regardless of channel completion order.
skipped_young.sort();
if !skipped_young.is_empty() {
- let names = skipped_young.join(", ");
+ let names = skipped_young
+ .iter()
+ .map(|n| cformat!("<bold>{n}</>"))
+ .collect::<Vec<_>>()
+ .join(", ");
eprintln!(
"{}",
info_message(format!("Skipped {names} (younger than {min_age})"))
@@ -508,7 +512,9 @@ pub fn step_prune(
if !dry_run {
eprintln!(
"{}",
- info_message(format!("Skipped {label} (younger than {min_age})"))
+ info_message(cformat!(
+ "Skipped <bold>{label}</> (younger than {min_age})"
+ ))
);
}
skipped_young.push(label);
@@ -569,7 +575,9 @@ pub fn step_prune(
if !dry_run {
eprintln!(
"{}",
- info_message(format!("Skipped {branch} (younger than {min_age})"))
+ info_message(cformat!(
+ "Skipped <bold>{branch}</> (younger than {min_age})"
+ ))
);
}
skipped_young.push(branch.clone());
diff --git a/src/git/error.rs b/src/git/error.rs
index 902c505bd..6b753271c 100644
--- a/src/git/error.rs
+++ b/src/git/error.rs
@@ -1057,8 +1057,8 @@ impl GitError {
write!(
f,
"\n{}",
- hint_message(format!(
- "Commit or stash these changes in {path_display} first"
+ hint_message(cformat!(
+ "Commit or stash these changes in <underline>{path_display}</> first"
))
)
}
@@ -2207,7 +2207,7 @@ mod tests {
};
assert_snapshot!(err.render(), @"
✗ Can't push to local main branch: conflicting uncommitted changes
- ↳ Commit or stash these changes in /tmp/repo first
+ ↳ Commit or stash these changes in /tmp/repo first
");
}
diff --git a/src/git/repository/mod.rs b/src/git/repository/mod.rs
index 73a835a7a..20a7d45b9 100644
--- a/src/git/repository/mod.rs
+++ b/src/git/repository/mod.rs
@@ -97,7 +97,6 @@ use once_cell::sync::OnceCell;
use wait_timeout::ChildExt;
use anyhow::{Context, bail};
-
use dunce::canonicalize;
use crate::config::{LoadError, ProjectConfig, ResolvedConfig, UserConfig};
@@ -1580,11 +1579,11 @@ fn emit_user_config_warnings(warnings: &[LoadError]) {
for warning in warnings {
match warning {
LoadError::File { path, label, err } => {
+ let path_display = crate::path::format_path_for_display(path);
crate::styling::eprintln!(
"{}",
crate::styling::warning_message(format!(
- "{label} at {} failed to parse, skipping",
- crate::path::format_path_for_display(path),
+ "{label} @ {path_display} failed to parse, skipping"
))
);
crate::styling::eprintln!(
diff --git a/src/main.rs b/src/main.rs
index c99e92825..702696fe5 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -296,8 +296,8 @@ fn handle_step_command(action: StepCommand, yes: bool) -> anyhow::Result<()> {
SquashResult::NoCommitsAhead(branch) => {
eprintln!(
"{}",
- info_message(format!(
- "Nothing to squash; no commits ahead of {branch}"
+ info_message(cformat!(
+ "Nothing to squash; no commits ahead of <bold>{branch}</>"
))
);
}
diff --git a/src/output/shell_integration.rs b/src/output/shell_integration.rs
index ca9f72bd3..f8cf32b69 100644
--- a/src/output/shell_integration.rs
+++ b/src/output/shell_integration.rs
@@ -531,7 +531,10 @@ pub fn print_shell_uninstall_result(scan_result: &UninstallScanResult, explicit_
let path = format_path_for_display(path);
let what = shell_extension_label(*shell);
if explicit_shell {
- eprintln!("{}", warning_message(format!("No {what} found in {path}")));
+ eprintln!(
+ "{}",
+ warning_message(cformat!("No {what} found in <bold>{path}</>"))
+ );
} else {
eprintln!(
"{}",
@@ -552,7 +555,7 @@ pub fn print_shell_uninstall_result(scan_result: &UninstallScanResult, explicit_
if explicit_shell {
eprintln!(
"{}",
- warning_message(format!("No completions found in {path}"))
+ warning_message(cformat!("No completions found in <bold>{path}</>"))
);
} else {
eprintln!(
diff --git a/tests/integration_tests/configure_shell.rs b/tests/integration_tests/configure_shell.rs
index 947b9a30e..244b63162 100644
--- a/tests/integration_tests/configure_shell.rs
+++ b/tests/integration_tests/configure_shell.rs
@@ -931,7 +931,7 @@ fn test_uninstall_shell_not_found(repo: TestRepo, temp_home: TempDir) {
----- stdout -----
----- stderr -----
- ▲ No shell extension & completions found in ~/.zshrc
+ ▲ No shell extension & completions found in ~/.zshrc
");
});
}
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__conflicting_changes.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__conflicting_changes.snap
index d0c93c868..1d37cc16a 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__conflicting_changes.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__conflicting_changes.snap
@@ -1,8 +1,8 @@
---
source: tests/integration_tests/git_error_display.rs
-expression: err.to_string()
+expression: err.render()
---
✗ Can't push to local main branch: conflicting uncommitted changes
  src/main.rs
  src/lib.rs
-↳ Commit or stash these changes in /tmp/repo.main first
+↳ Commit or stash these changes in /tmp/repo.main first
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_system_config.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_system_config.snap
index 8f6a54996..8a8f1552e 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_system_config.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_system_config.snap
@@ -77,7 +77,7 @@ exit_code: 0
○ Hyperlinks: inactive
----- stderr -----
-▲ System config at [PROJECT_ID] failed to parse, skipping
+▲ System config @ [PROJECT_ID] failed to parse, skipping
  TOML parse error at line 1, column 16
  |
  1 | invalid = [toml
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_user_toml.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_user_toml.snap
index 7e9064b9e..ea8ed2522 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_user_toml.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_invalid_user_toml.snap
@@ -75,7 +75,7 @@ exit_code: 0
○ Hyperlinks: inactive
----- stderr -----
-▲ User config at ~/.config/worktrunk/config.toml failed to parse, skipping
+▲ User config @ ~/.config/worktrunk/config.toml failed to parse, skipping
  TOML parse error at line 1, column 6
  |
  1 | this is not valid toml {{{
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_update_applies_approved_commands_migration.snap b/tests/snapshots/integration__integration_tests__config_show__config_update_applies_approved_commands_migration.snap
index 13f73b3b0..561c33c82 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_update_applies_approved_commands_migration.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_update_applies_approved_commands_migration.snap
@@ -65,5 +65,5 @@ exit_code: 0
  -
  -[projects."github.com/user/repo"]
  -approved-commands = ["npm install", "npm test"]
-○ Copied approved commands to approvals.toml
+○ Copied approved commands to approvals.toml
✓ Updated user config
diff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_config_warns_on_stderr.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_config_warns_on_stderr.snap
index d3745c3f5..8a7609fb6 100644
--- a/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_config_warns_on_stderr.snap
+++ b/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_config_warns_on_stderr.snap
@@ -10,10 +10,15 @@ info:
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
@@ -29,13 +34,17 @@ info:
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_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_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
@@ -50,7 +59,7 @@ exit_code: 0
○ Showing 4 worktrees, 3 ahead
----- stderr -----
-▲ User config at [TEST_CONFIG] failed to parse, skipping
+▲ User config @ [TEST_CONFIG] failed to parse, skipping
  TOML parse error at line 2, column 12
  |
  2 | branches = "not-a-bool"
diff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_non_section_field_warns_on_stderr.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_non_section_field_warns_on_stderr.snap
index 477ed0231..c89bc21bc 100644
--- a/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_non_section_field_warns_on_stderr.snap
+++ b/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_non_section_field_warns_on_stderr.snap
@@ -10,10 +10,15 @@ info:
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
@@ -29,13 +34,17 @@ info:
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_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_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
@@ -50,7 +59,7 @@ exit_code: 0
○ Showing 4 worktrees, 3 ahead
----- stderr -----
-▲ User config at [TEST_CONFIG] failed to parse, skipping
+▲ User config @ [TEST_CONFIG] failed to parse, skipping
  TOML parse error at line 1, column 33
  |
  1 | skip-shell-integration-prompt = "not-a-bool"
diff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_system_config_non_section_field.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_system_config_non_section_field.snap
index f4899714e..64ac308a5 100644
--- a/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_system_config_non_section_field.snap
+++ b/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_system_config_non_section_field.snap
@@ -10,10 +10,15 @@ info:
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
@@ -29,13 +34,17 @@ info:
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_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_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
@@ -50,7 +59,7 @@ exit_code: 0
○ Showing 4 worktrees, 1 with changes, 3 ahead
----- stderr -----
-▲ System config at [TEST_SYSTEM_CONFIG_FILE] failed to parse, skipping
+▲ System config @ [TEST_SYSTEM_CONFIG_FILE] failed to parse, skipping
  TOML parse error at line 1, column 33
  |
  1 | skip-shell-integration-prompt = "not-a-bool"
diff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_system_config_warns_on_stderr.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_system_config_warns_on_stderr.snap
index c24cc9a3d..02fc6c7c3 100644
--- a/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_system_config_warns_on_stderr.snap
+++ b/tests/snapshots/integration__integration_tests__list_config__list_config_malformed_system_config_warns_on_stderr.snap
@@ -10,10 +10,15 @@ info:
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
@@ -29,13 +34,17 @@ info:
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_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_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
@@ -50,7 +59,7 @@ exit_code: 0
○ Showing 4 worktrees, 1 with changes, 3 ahead
----- stderr -----
-▲ System config at [TEST_SYSTEM_CONFIG_FILE] failed to parse, skipping
+▲ System config @ [TEST_SYSTEM_CONFIG_FILE] failed to parse, skipping
  TOML parse error at line 2, column 12
  |
  2 | branches = "not-a-bool"
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_error_conflicting_changes_in_target.snap b/tests/snapshots/integration__integration_tests__merge__merge_error_conflicting_changes_in_target.snap
index 8822d9c3a..c3f6e82bf 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_error_conflicting_changes_in_target.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_error_conflicting_changes_in_target.snap
@@ -11,10 +11,15 @@ info:
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
@@ -30,13 +35,17 @@ info:
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_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_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: false
@@ -46,4 +55,4 @@ exit_code: 1
----- stderr -----
✗ Can't push to local main branch: conflicting uncommitted changes
  shared.txt
-↳ Commit or stash these changes in _REPO_.main-wt first
+↳ Commit or stash these changes in _REPO_.main-wt first
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_ff_dirty_target_conflict.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_ff_dirty_target_conflict.snap
index 372c6e52b..ca0a7c30b 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_no_ff_dirty_target_conflict.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_ff_dirty_target_conflict.snap
@@ -13,10 +13,15 @@ info:
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
@@ -32,13 +37,17 @@ info:
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_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_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: false
@@ -48,4 +57,4 @@ exit_code: 1
----- stderr -----
✗ Can't push to local main branch: conflicting uncommitted changes
  conflict.txt
-↳ Commit or stash these changes in _REPO_ first
+↳ Commit or stash these changes in _REPO_ first
diff --git a/tests/snapshots/integration__integration_tests__merge__step_squash_no_commits.snap b/tests/snapshots/integration__integration_tests__merge__step_squash_no_commits.snap
index c904f66a6..61a70a10c 100644
--- a/tests/snapshots/integration__integration_tests__merge__step_squash_no_commits.snap
+++ b/tests/snapshots/integration__integration_tests__merge__step_squash_no_commits.snap
@@ -11,10 +11,15 @@ info:
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
@@ -30,13 +35,17 @@ info:
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_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_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
@@ -44,4 +53,4 @@ exit_code: 0
----- stdout -----
----- stderr -----
-○ Nothing to squash; no commits ahead of main
+○ Nothing to squash; no commits ahead of main
diff --git a/tests/snapshots/integration__integration_tests__push__push_dirty_target_overlap.snap b/tests/snapshots/integration__integration_tests__push__push_dirty_target_overlap.snap
index be2ec73dc..a4f0970ff 100644
--- a/tests/snapshots/integration__integration_tests__push__push_dirty_target_overlap.snap
+++ b/tests/snapshots/integration__integration_tests__push__push_dirty_target_overlap.snap
@@ -12,10 +12,15 @@ info:
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
@@ -31,13 +36,17 @@ info:
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_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_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: false
@@ -47,4 +56,4 @@ exit_code: 1
----- stderr -----
✗ Can't push to local main branch: conflicting uncommitted changes
  conflict.txt
-↳ Commit or stash these changes in _REPO_ first
+↳ Commit or stash these changes in _REPO_ first
diff --git a/tests/snapshots/integration__integration_tests__push__push_dirty_target_overlap_renamed_file.snap b/tests/snapshots/integration__integration_tests__push__push_dirty_target_overlap_renamed_file.snap
index 76d83aa27..c65694875 100644
--- a/tests/snapshots/integration__integration_tests__push__push_dirty_target_overlap_renamed_file.snap
+++ b/tests/snapshots/integration__integration_tests__push__push_dirty_target_overlap_renamed_file.snap
@@ -12,10 +12,15 @@ info:
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
@@ -31,13 +36,17 @@ info:
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_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_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: false
@@ -47,4 +56,4 @@ exit_code: 1
----- stderr -----
✗ Can't push to local main branch: conflicting uncommitted changes
  file.txt
-↳ Commit or stash these changes in _REPO_ first
+↳ Commit or stash these changes in _REPO_ first
diff --git a/tests/snapshots/integration__integration_tests__step_prune__prune_min_age_skips_young.snap b/tests/snapshots/integration__integration_tests__step_prune__prune_min_age_skips_young.snap
index 46a290531..87e507dcb 100644
--- a/tests/snapshots/integration__integration_tests__step_prune__prune_min_age_skips_young.snap
+++ b/tests/snapshots/integration__integration_tests__step_prune__prune_min_age_skips_young.snap
@@ -12,10 +12,15 @@ info:
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
@@ -31,13 +36,17 @@ info:
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_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_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
@@ -45,4 +54,4 @@ exit_code: 0
----- stdout -----
----- stderr -----
-○ Skipped young-branch (younger than 1h)
+○ Skipped young-branch (younger than 1h)
diff --git a/tests/snapshots/integration__integration_tests__step_prune__prune_orphan_branch_min_age.snap b/tests/snapshots/integration__integration_tests__step_prune__prune_orphan_branch_min_age.snap
index 21cb1ebd2..dfcce41ff 100644
--- a/tests/snapshots/integration__integration_tests__step_prune__prune_orphan_branch_min_age.snap
+++ b/tests/snapshots/integration__integration_tests__step_prune__prune_orphan_branch_min_age.snap
@@ -12,10 +12,15 @@ info:
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
@@ -31,13 +36,17 @@ info:
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_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735691400"
+ WORKTRUNK_TEST_FISH_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
@@ -45,4 +54,4 @@ exit_code: 0
----- stdout -----
----- stderr -----
-○ Skipped orphan-integrated (younger than 1h)
+○ Skipped orphan-integrated (younger than 1h)
diff --git a/tests/snapshots/integration__integration_tests__step_prune__prune_stale_plus_young.snap b/tests/snapshots/integration__integration_tests__step_prune__prune_stale_plus_young.snap
index 97219d7f8..b89849b48 100644
--- a/tests/snapshots/integration__integration_tests__step_prune__prune_stale_plus_young.snap
+++ b/tests/snapshots/integration__integration_tests__step_prune__prune_stale_plus_young.snap
@@ -12,10 +12,15 @@ info:
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
@@ -31,13 +36,17 @@ info:
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_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735691400"
+ WORKTRUNK_TEST_FISH_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
@@ -46,5 +55,5 @@ exit_code: 0
----- stderr -----
○ stale-branch (stale) — same commit as main
-○ Skipped young-branch, young-orphan (younger than 1h)
+○ Skipped young-branch, young-orphan (younger than 1h)
↳ 1 branch would be removed (dry run)
diff --git a/tests/snapshots/integration__integration_tests__step_prune__prune_stale_plus_young_non_dry_run.snap b/tests/snapshots/integration__integration_tests__step_prune__prune_stale_plus_young_non_dry_run.snap
index e7e5e873f..f095321bd 100644
--- a/tests/snapshots/integration__integration_tests__step_prune__prune_stale_plus_young_non_dry_run.snap
+++ b/tests/snapshots/integration__integration_tests__step_prune__prune_stale_plus_young_non_dry_run.snap
@@ -12,10 +12,15 @@ info:
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
@@ -32,13 +37,17 @@ info:
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_DELAYED_STREAM_MS: "-1"
WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_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
@@ -47,5 +56,5 @@ exit_code: 0
----- stderr -----
✓ Pruned stale worktree & removed branch stale-branch (same commit as main, _)
-○ Skipped young-branch (younger than 1h)
+○ Skipped young-branch (younger than 1h)
✓ Pruned 1 branch