Skip to content

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

Refactor: Remove `--internal` flag from commands

Maximilian Roos182cf5ca66be
diff --git a/src/commands/merge.rs b/src/commands/merge.rs
index 2b834bf5f..427df27b6 100644
--- a/src/commands/merge.rs
+++ b/src/commands/merge.rs
@@ -17,7 +17,6 @@ pub fn handle_merge(
message: Option<&str>,
no_verify: bool,
force: bool,
- internal: bool,
) -> Result<(), GitError> {
let repo = Repository::current();
@@ -62,7 +61,6 @@ pub fn handle_merge(
&repo,
&config,
force,
- internal,
)?;
}
@@ -71,26 +69,26 @@ pub fn handle_merge(
// Squash commits if requested
if squash {
- squashed_count = handle_squash(&target_branch, internal)?;
+ squashed_count = handle_squash(&target_branch)?;
}
// Rebase onto target
- if !internal {
- println!("πŸ”„ {CYAN}Rebasing onto {CYAN_BOLD}{target_branch}{CYAN_BOLD:#}...{CYAN:#}");
- }
+ crate::output::progress(format!(
+ "πŸ”„ {CYAN}Rebasing onto {CYAN_BOLD}{target_branch}{CYAN_BOLD:#}...{CYAN:#}"
+ ))
+ .map_err(|e| GitError::CommandFailed(e.to_string()))?;
repo.run_command(&["rebase", &target_branch]).map_err(|e| {
GitError::CommandFailed(format!("Failed to rebase onto '{}': {}", target_branch, e))
})?;
// Fast-forward push to target branch (reuse handle_push logic)
- handle_push(Some(&target_branch), false, internal)?;
+ handle_push(Some(&target_branch), false)?;
// Finish worktree unless --keep was specified
if !keep {
- if !internal {
- println!("πŸ”„ {CYAN}Cleaning up worktree...{CYAN:#}");
- }
+ crate::output::progress(format!("πŸ”„ {CYAN}Cleaning up worktree...{CYAN:#}"))
+ .map_err(|e| GitError::CommandFailed(e.to_string()))?;
// Get primary worktree path before finishing (while we can still run git commands)
let primary_worktree_dir = repo.main_worktree_root()?;
@@ -104,11 +102,10 @@ pub fn handle_merge(
let primary_repo = Repository::at(&primary_worktree_dir);
let new_branch = primary_repo.current_branch()?;
if new_branch.as_deref() != Some(&target_branch) {
- if !internal {
- println!(
- "πŸ”„ {CYAN}Switching to {CYAN_BOLD}{target_branch}{CYAN_BOLD:#}...{CYAN:#}"
- );
- }
+ crate::output::progress(format!(
+ "πŸ”„ {CYAN}Switching to {CYAN_BOLD}{target_branch}{CYAN_BOLD:#}...{CYAN:#}"
+ ))
+ .map_err(|e| GitError::CommandFailed(e.to_string()))?;
primary_repo
.run_command(&["switch", &target_branch])
.map_err(|e| {
@@ -218,7 +215,7 @@ fn handle_commit_changes(
Ok(())
}
-fn handle_squash(target_branch: &str, internal: bool) -> Result<Option<usize>, GitError> {
+fn handle_squash(target_branch: &str) -> Result<Option<usize>, GitError> {
let repo = Repository::current();
// Get merge base with target branch
@@ -233,10 +230,11 @@ fn handle_squash(target_branch: &str, internal: bool) -> Result<Option<usize>, G
// Handle different scenarios
if commit_count == 0 && !has_staged {
// No commits and no staged changes - nothing to squash
- if !internal {
- let dim = AnstyleStyle::new().dimmed();
- println!("{dim}No commits to squash - already at merge base{dim:#}");
- }
+ let dim = AnstyleStyle::new().dimmed();
+ crate::output::progress(format!(
+ "{dim}No commits to squash - already at merge base{dim:#}"
+ ))
+ .map_err(|e| GitError::CommandFailed(e.to_string()))?;
return Ok(None);
}
@@ -250,19 +248,19 @@ fn handle_squash(target_branch: &str, internal: bool) -> Result<Option<usize>, G
if commit_count == 1 && !has_staged {
// Single commit, no staged changes - nothing to do
- if !internal {
- let dim = AnstyleStyle::new().dimmed();
- println!(
- "{dim}Only 1 commit since {CYAN_BOLD}{target_branch}{CYAN_BOLD:#} - no squashing needed{dim:#}"
- );
- }
+ let dim = AnstyleStyle::new().dimmed();
+ crate::output::progress(format!(
+ "{dim}Only 1 commit since {CYAN_BOLD}{target_branch}{CYAN_BOLD:#} - no squashing needed{dim:#}"
+ ))
+ .map_err(|e| GitError::CommandFailed(e.to_string()))?;
return Ok(None);
}
// One or more commits (possibly with staged changes) - squash them
- if !internal {
- println!("πŸ”„ {CYAN}Squashing {commit_count} commits into one...{CYAN:#}");
- }
+ crate::output::progress(format!(
+ "πŸ”„ {CYAN}Squashing {commit_count} commits into one...{CYAN:#}"
+ ))
+ .map_err(|e| GitError::CommandFailed(e.to_string()))?;
// Get commit subjects for the squash message
let range = format!("{}..HEAD", merge_base);
@@ -285,9 +283,10 @@ fn handle_squash(target_branch: &str, internal: bool) -> Result<Option<usize>, G
repo.run_command(&["commit", "-m", &commit_message])
.map_err(|e| GitError::CommandFailed(format!("Failed to create squash commit: {}", e)))?;
- if !internal {
- println!("βœ… {GREEN}Squashed {commit_count} commits into one{GREEN:#}");
- }
+ crate::output::progress(format!(
+ "βœ… {GREEN}Squashed {commit_count} commits into one{GREEN:#}"
+ ))
+ .map_err(|e| GitError::CommandFailed(e.to_string()))?;
Ok(Some(commit_count))
}
@@ -300,7 +299,6 @@ fn run_pre_merge_checks(
repo: &Repository,
config: &WorktrunkConfig,
force: bool,
- internal: bool,
) -> Result<(), GitError> {
let Some(pre_merge_config) = &project_config.pre_merge_check else {
return Ok(());
@@ -320,14 +318,11 @@ fn run_pre_merge_checks(
},
)?;
for prepared in commands {
- if !internal {
- use std::io::Write;
- println!(
- "πŸ”„ {CYAN}Running pre-merge check '{name}'...{CYAN:#}",
- name = prepared.name
- );
- let _ = std::io::stdout().flush();
- }
+ crate::output::progress(format!(
+ "πŸ”„ {CYAN}Running pre-merge check '{name}'...{CYAN:#}",
+ name = prepared.name
+ ))
+ .map_err(|e| GitError::CommandFailed(e.to_string()))?;
if let Err(e) = execute_command_in_worktree(worktree_path, &prepared.expanded) {
eprintln!();
diff --git a/src/commands/worktree.rs b/src/commands/worktree.rs
index 827ac4960..8752c08d5 100644
--- a/src/commands/worktree.rs
+++ b/src/commands/worktree.rs
@@ -536,11 +536,7 @@ fn spawn_post_start_commands(
Ok(())
}
-pub fn handle_push(
- target: Option<&str>,
- allow_merge_commits: bool,
- internal: bool,
-) -> Result<(), GitError> {
+pub fn handle_push(target: Option<&str>, allow_merge_commits: bool) -> Result<(), GitError> {
let repo = Repository::current();
// Get target branch (default to default branch if not provided)
@@ -590,7 +586,7 @@ pub fn handle_push(
String::new()
};
- if commit_count > 0 && !internal {
+ if commit_count > 0 {
let commit_text = if commit_count == 1 {
"commit"
} else {
@@ -599,10 +595,10 @@ pub fn handle_push(
let head_sha = repo.run_command(&["rev-parse", "--short", "HEAD"])?;
let head_sha = head_sha.trim();
- println!(
- "πŸ”„ {CYAN}Pushing {commit_count} {commit_text} to {CYAN_BOLD}{target_branch}{CYAN_BOLD:#} @ {head_sha}{CYAN:#}"
- );
- println!();
+ crate::output::progress(format!(
+ "πŸ”„ {CYAN}Pushing {commit_count} {commit_text} to {CYAN_BOLD}{target_branch}{CYAN_BOLD:#} @ {head_sha}{CYAN:#}\n"
+ ))
+ .map_err(|e| GitError::CommandFailed(e.to_string()))?;
// Show the commit graph with color
let log_output = repo.run_command(&[
@@ -613,8 +609,8 @@ pub fn handle_push(
"--decorate",
&format!("{}..HEAD", target_branch),
])?;
- println!("{}", log_output.trim());
- println!();
+ crate::output::progress(format!("{}\n", log_output.trim()))
+ .map_err(|e| GitError::CommandFailed(e.to_string()))?;
// Show diff statistics with color
let diff_stat = repo.run_command(&[
@@ -626,8 +622,8 @@ pub fn handle_push(
let diff_stat = diff_stat.trim_end();
if !diff_stat.is_empty() {
- println!("{}", diff_stat);
- println!();
+ crate::output::progress(format!("{}\n", diff_stat))
+ .map_err(|e| GitError::CommandFailed(e.to_string()))?;
}
}
@@ -642,39 +638,41 @@ pub fn handle_push(
})?;
// Build success message with statistics
- if !internal {
- if commit_count > 0 {
- // Parse shortstat to extract files/insertions/deletions
- // Example: " 3 files changed, 45 insertions(+), 12 deletions(-)"
- let stats = parse_diff_shortstat(&diff_shortstat);
-
- let mut summary_parts = vec![format!(
- "{} commit{}",
- commit_count,
- if commit_count == 1 { "" } else { "s" }
- )];
-
- if let Some(files) = stats.files {
- summary_parts.push(format!(
- "{} file{}",
- files,
- if files == 1 { "" } else { "s" }
- ));
- }
- if let Some(insertions) = stats.insertions {
- summary_parts.push(format!("{ADDITION}+{insertions}{ADDITION:#}"));
- }
- if let Some(deletions) = stats.deletions {
- summary_parts.push(format!("{DELETION}-{deletions}{DELETION:#}"));
- }
-
- println!(
- "βœ… {GREEN}Pushed to {GREEN_BOLD}{target_branch}{GREEN_BOLD:#} ({}) {GREEN:#}",
- summary_parts.join(", ")
- );
- } else {
- println!("βœ… {GREEN}Pushed to {GREEN_BOLD}{target_branch}{GREEN_BOLD:#}{GREEN:#}");
+ if commit_count > 0 {
+ // Parse shortstat to extract files/insertions/deletions
+ // Example: " 3 files changed, 45 insertions(+), 12 deletions(-)"
+ let stats = parse_diff_shortstat(&diff_shortstat);
+
+ let mut summary_parts = vec![format!(
+ "{} commit{}",
+ commit_count,
+ if commit_count == 1 { "" } else { "s" }
+ )];
+
+ if let Some(files) = stats.files {
+ summary_parts.push(format!(
+ "{} file{}",
+ files,
+ if files == 1 { "" } else { "s" }
+ ));
+ }
+ if let Some(insertions) = stats.insertions {
+ summary_parts.push(format!("{ADDITION}+{insertions}{ADDITION:#}"));
}
+ if let Some(deletions) = stats.deletions {
+ summary_parts.push(format!("{DELETION}-{deletions}{DELETION:#}"));
+ }
+
+ crate::output::progress(format!(
+ "βœ… {GREEN}Pushed to {GREEN_BOLD}{target_branch}{GREEN_BOLD:#} ({}) {GREEN:#}",
+ summary_parts.join(", ")
+ ))
+ .map_err(|e| GitError::CommandFailed(e.to_string()))?;
+ } else {
+ crate::output::progress(format!(
+ "βœ… {GREEN}Pushed to {GREEN_BOLD}{target_branch}{GREEN_BOLD:#}{GREEN:#}"
+ ))
+ .map_err(|e| GitError::CommandFailed(e.to_string()))?;
}
Ok(())
diff --git a/src/main.rs b/src/main.rs
index a2f2d5590..1706846ca 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -35,6 +35,10 @@ struct Cli {
#[arg(long, short = 'v', global = true)]
verbose: bool,
+ /// Use internal mode (outputs directives for shell wrapper)
+ #[arg(long, global = true, hide = true)]
+ internal: bool,
+
#[command(subcommand)]
command: Commands,
}
@@ -115,20 +119,12 @@ enum Commands {
/// Skip executing post-start commands from project config
#[arg(long)]
no_config_commands: bool,
-
- /// Use internal mode (outputs directives for shell wrapper)
- #[arg(long, hide = true)]
- internal: bool,
},
/// Finish current worktree, returning to primary if current
Remove {
/// Worktree name or branch to remove (defaults to current worktree)
worktree: Option<String>,
-
- /// Use internal mode (outputs directives for shell wrapper)
- #[arg(long, hide = true)]
- internal: bool,
},
/// Push changes between worktrees
@@ -165,10 +161,6 @@ enum Commands {
/// Skip approval prompts for commands
#[arg(short, long)]
force: bool,
-
- /// Use internal mode (outputs directives for shell wrapper)
- #[arg(long, hide = true)]
- internal: bool,
},
/// Generate shell completion script (deprecated - use init instead)
@@ -191,6 +183,14 @@ enum Commands {
fn main() {
let cli = Cli::parse();
+ // Initialize output context based on --internal flag
+ let output_mode = if cli.internal {
+ output::OutputMode::Directive
+ } else {
+ output::OutputMode::Interactive
+ };
+ output::initialize(output_mode);
+
// Configure logging based on --verbose flag or RUST_LOG env var
env_logger::Builder::from_env(
env_logger::Env::default().default_filter_or(if cli.verbose { "debug" } else { "off" }),
@@ -311,45 +311,26 @@ fn main() {
execute,
force,
no_config_commands,
- internal,
- } => {
- // Initialize output context based on mode
- let output_mode = if internal {
- output::OutputMode::Directive
- } else {
- output::OutputMode::Interactive
- };
- output::initialize(output_mode);
-
- WorktrunkConfig::load()
- .map_err(|e| GitError::CommandFailed(format!("Failed to load config: {}", e)))
- .and_then(|config| {
- handle_switch(
- &branch,
- create,
- base.as_deref(),
- force,
- no_config_commands,
- &config,
- )
- .and_then(|result| handle_switch_output(&result, &branch, execute.as_deref()))
- })
- }
- Commands::Remove { worktree, internal } => {
- // Initialize output context based on mode
- let output_mode = if internal {
- output::OutputMode::Directive
- } else {
- output::OutputMode::Interactive
- };
- output::initialize(output_mode);
-
+ } => WorktrunkConfig::load()
+ .map_err(|e| GitError::CommandFailed(format!("Failed to load config: {}", e)))
+ .and_then(|config| {
+ handle_switch(
+ &branch,
+ create,
+ base.as_deref(),
+ force,
+ no_config_commands,
+ &config,
+ )
+ .and_then(|result| handle_switch_output(&result, &branch, execute.as_deref()))
+ }),
+ Commands::Remove { worktree } => {
handle_remove(worktree.as_deref()).and_then(|result| handle_remove_output(&result))
}
Commands::Push {
target,
allow_merge_commits,
- } => handle_push(target.as_deref(), allow_merge_commits, false),
+ } => handle_push(target.as_deref(), allow_merge_commits),
Commands::Merge {
target,
squash,
@@ -357,26 +338,14 @@ fn main() {
message,
no_verify,
force,
- internal,
- } => {
- // Initialize output context based on mode
- let output_mode = if internal {
- output::OutputMode::Directive
- } else {
- output::OutputMode::Interactive
- };
- output::initialize(output_mode);
-
- handle_merge(
- target.as_deref(),
- squash,
- keep,
- message.as_deref(),
- no_verify,
- force,
- internal,
- )
- }
+ } => handle_merge(
+ target.as_deref(),
+ squash,
+ keep,
+ message.as_deref(),
+ no_verify,
+ force,
+ ),
Commands::Completion { shell } => {
let mut cli_cmd = Cli::command();
handle_completion(shell, &mut cli_cmd);
diff --git a/src/output/directive.rs b/src/output/directive.rs
index b431b9362..4952c8ac3 100644
--- a/src/output/directive.rs
+++ b/src/output/directive.rs
@@ -24,6 +24,11 @@ impl DirectiveOutput {
io::stdout().flush()
}
+ pub fn progress(&mut self, _message: String) -> io::Result<()> {
+ // Progress messages are only for humans - suppress in directive mode
+ Ok(())
+ }
+
pub fn change_directory(&mut self, path: &Path) -> io::Result<()> {
// Ensure any prior stderr output is NUL-terminated before writing directive
// The shell wrapper merges stderr+stdout via 2>&1 and splits on NUL bytes,
diff --git a/src/output/global.rs b/src/output/global.rs
index 9ec74522a..785960554 100644
--- a/src/output/global.rs
+++ b/src/output/global.rs
@@ -68,6 +68,20 @@ pub fn success(message: impl Into<String>) -> io::Result<()> {
})
}
+/// Emit a progress message (only shown in interactive mode)
+///
+/// Progress messages are intermediate status updates like "πŸ”„ Cleaning up worktree..."
+/// They are shown to human users but suppressed in directive mode (shell integration).
+pub fn progress(message: impl Into<String>) -> io::Result<()> {
+ OUTPUT_CONTEXT.with(|ctx| {
+ let msg = message.into();
+ match &mut *ctx.borrow_mut() {
+ OutputHandler::Interactive(i) => i.progress(msg),
+ OutputHandler::Directive(d) => d.progress(msg),
+ }
+ })
+}
+
/// Request directory change (for shell integration)
pub fn change_directory(path: impl AsRef<Path>) -> io::Result<()> {
OUTPUT_CONTEXT.with(|ctx| {
diff --git a/src/output/handlers.rs b/src/output/handlers.rs
index f43b5b7ba..fe9f47f10 100644
--- a/src/output/handlers.rs
+++ b/src/output/handlers.rs
@@ -78,11 +78,10 @@ pub fn handle_switch_output(
// Execute command if provided
if let Some(cmd) = execute {
super::execute(cmd).map_err(|e| GitError::CommandFailed(e.to_string()))?;
- } else if super::is_interactive() {
- // No execute command in interactive mode: show shell integration hint
- use worktrunk::styling::println;
- println!();
- println!("{}", shell_integration_hint());
+ } else {
+ // No execute command: show shell integration hint (only in interactive mode)
+ super::progress(format!("\n{}", shell_integration_hint()))
+ .map_err(|e| GitError::CommandFailed(e.to_string()))?;
}
// Flush output (important for directive mode)
diff --git a/src/output/interactive.rs b/src/output/interactive.rs
index fe3fc97a8..357e63796 100644
--- a/src/output/interactive.rs
+++ b/src/output/interactive.rs
@@ -23,6 +23,11 @@ impl InteractiveOutput {
Ok(())
}
+ pub fn progress(&mut self, message: String) -> io::Result<()> {
+ println!("{message}");
+ Ok(())
+ }
+
pub fn change_directory(&mut self, path: &Path) -> io::Result<()> {
// In interactive mode, we can't actually change directory
// Just store the target for execute commands
diff --git a/src/output/mod.rs b/src/output/mod.rs
index 61bdb18dd..41d1e19dd 100644
--- a/src/output/mod.rs
+++ b/src/output/mod.rs
@@ -63,7 +63,7 @@ pub mod interactive;
// Re-export the public API
pub use global::{
- OutputMode, change_directory, execute, flush, initialize, is_interactive, success,
+ OutputMode, change_directory, execute, flush, initialize, is_interactive, progress, success,
};
// Re-export output handlers
diff --git a/templates/bash.sh b/templates/bash.sh
index ced5b9683..ce127b9b6 100644
--- a/templates/bash.sh
+++ b/templates/bash.sh
@@ -60,7 +60,7 @@ if command -v wt >/dev/null 2>&1; then
switch|remove|merge)
# Commands that need --internal for directory change support
shift
- _wt_exec "$subcommand" --internal "$@"
+ _wt_exec --internal "$subcommand" "$@"
;;
*)
# All other commands pass through directly
diff --git a/templates/elvish.elv b/templates/elvish.elv
index dc5479580..b4d8198e4 100644
--- a/templates/elvish.elv
+++ b/templates/elvish.elv
@@ -65,7 +65,7 @@ if (has-external wt) {
if (or (eq $subcommand "switch") (eq $subcommand "remove") (eq $subcommand "merge")) {
# Commands that need --internal for directory change support
var rest-args = $args[1..]
- _wt_exec $subcommand --internal $@rest-args
+ _wt_exec --internal $subcommand $@rest-args
} else {
# All other commands pass through directly
e:$_WORKTRUNK_CMD $@args
diff --git a/templates/fish.fish b/templates/fish.fish
index f2ee40843..95327dc92 100644
--- a/templates/fish.fish
+++ b/templates/fish.fish
@@ -95,7 +95,7 @@ if type -q {{ cmd_prefix }}
switch $subcommand
case switch remove merge
# Commands that need --internal for directory change support
- _wt_exec $subcommand --internal $argv[2..-1]
+ _wt_exec --internal $subcommand $argv[2..-1]
case '*'
# All other commands pass through directly
command $_WORKTRUNK_CMD $argv
diff --git a/templates/nushell.nu b/templates/nushell.nu
index f50973948..32b70ad68 100644
--- a/templates/nushell.nu
+++ b/templates/nushell.nu
@@ -47,7 +47,7 @@ if (which wt | is-not-empty) {
"switch" | "remove" | "merge" => {
# Commands that need --internal for directory change support
let rest_args = ($rest | skip 1)
- let internal_args = ([$subcommand, "--internal"] | append $rest_args)
+ let internal_args = (["--internal", $subcommand] | append $rest_args)
let exit_code = (_wt_exec ...$internal_args)
return $exit_code
}
diff --git a/templates/powershell.ps1 b/templates/powershell.ps1
index e9e09c228..9e8dc615e 100644
--- a/templates/powershell.ps1
+++ b/templates/powershell.ps1
@@ -63,7 +63,7 @@ if (Get-Command wt -ErrorAction SilentlyContinue) {
{ $_ -in @("switch", "remove", "merge") } {
# Commands that need --internal for directory change support
$restArgs = $Arguments[1..($Arguments.Count-1)]
- $exitCode = _wt_exec $subcommand --internal @restArgs
+ $exitCode = _wt_exec --internal $subcommand @restArgs
return $exitCode
}
default {
diff --git a/templates/xonsh.xsh b/templates/xonsh.xsh
index da031239b..6648d851e 100644
--- a/templates/xonsh.xsh
+++ b/templates/xonsh.xsh
@@ -51,7 +51,7 @@ if shutil.which("wt") is not None:
if subcommand in ["switch", "remove", "merge"]:
# Commands that need --internal for directory change support
rest_args = args[1:]
- return _wt_exec([subcommand, "--internal"] + rest_args)
+ return _wt_exec(["--internal", subcommand] + rest_args)
else:
# All other commands pass through directly
result = ![@(_WORKTRUNK_CMD) @(args)]
diff --git a/tests/common/mod.rs b/tests/common/mod.rs
index 585efb71b..71637b041 100644
--- a/tests/common/mod.rs
+++ b/tests/common/mod.rs
@@ -394,20 +394,42 @@ pub fn setup_snapshot_settings(repo: &TestRepo) -> insta::Settings {
///
/// This extracts the common command setup while allowing the test file
/// to call the macro with the correct module path for snapshot naming.
-pub fn make_snapshot_cmd(
+///
+/// # Arguments
+/// * `repo` - The test repository
+/// * `subcommand` - The subcommand to run (e.g., "switch", "remove")
+/// * `args` - Arguments to pass after the subcommand
+/// * `cwd` - Optional working directory (defaults to repo root)
+/// * `global_flags` - Optional global flags to pass before the subcommand (e.g., &["--internal"])
+pub fn make_snapshot_cmd_with_global_flags(
repo: &TestRepo,
subcommand: &str,
args: &[&str],
cwd: Option<&Path>,
+ global_flags: &[&str],
) -> Command {
let mut cmd = Command::new(insta_cmd::get_cargo_bin("wt"));
repo.clean_cli_env(&mut cmd);
- cmd.arg(subcommand)
+ cmd.args(global_flags)
+ .arg(subcommand)
.args(args)
.current_dir(cwd.unwrap_or(repo.root_path()));
cmd
}
+/// Create a configured Command for snapshot testing
+///
+/// This extracts the common command setup while allowing the test file
+/// to call the macro with the correct module path for snapshot naming.
+pub fn make_snapshot_cmd(
+ repo: &TestRepo,
+ subcommand: &str,
+ args: &[&str],
+ cwd: Option<&Path>,
+) -> Command {
+ make_snapshot_cmd_with_global_flags(repo, subcommand, args, cwd, &[])
+}
+
/// Resolve the actual git directory path from a worktree path
///
/// In worktrees, `.git` is a file containing `gitdir: /path/to/git/dir`,
diff --git a/tests/integration_tests/directives.rs b/tests/integration_tests/directives.rs
index fe7636b87..819ef7c9d 100644
--- a/tests/integration_tests/directives.rs
+++ b/tests/integration_tests/directives.rs
@@ -18,9 +18,9 @@ fn test_switch_internal_directive() {
settings.bind(|| {
let mut cmd = Command::new(get_cargo_bin("wt"));
repo.clean_cli_env(&mut cmd);
- cmd.arg("switch")
+ cmd.arg("--internal")
+ .arg("switch")
.arg("my-feature")
- .arg("--internal")
.current_dir(repo.root_path());
assert_cmd_snapshot!("switch_internal_directive", cmd);
@@ -62,8 +62,8 @@ fn test_remove_internal_directive() {
settings.bind(|| {
let mut cmd = Command::new(get_cargo_bin("wt"));
repo.clean_cli_env(&mut cmd);
- cmd.arg("remove")
- .arg("--internal")
+ cmd.arg("--internal")
+ .arg("remove")
.current_dir(repo.root_path());
assert_cmd_snapshot!("remove_internal_directive", cmd);
@@ -131,10 +131,10 @@ fn test_merge_internal_keep() {
settings.bind(|| {
let mut cmd = Command::new(get_cargo_bin("wt"));
repo.clean_cli_env(&mut cmd);
- cmd.arg("merge")
+ cmd.arg("--internal")
+ .arg("merge")
.arg("main")
.arg("--keep")
- .arg("--internal")
.current_dir(&feature_wt);
assert_cmd_snapshot!("merge_internal_keep", cmd);
diff --git a/tests/integration_tests/remove.rs b/tests/integration_tests/remove.rs
index 145b55cb2..894227a9d 100644
--- a/tests/integration_tests/remove.rs
+++ b/tests/integration_tests/remove.rs
@@ -1,12 +1,23 @@
-use crate::common::{TestRepo, make_snapshot_cmd, setup_snapshot_settings};
+use crate::common::{TestRepo, make_snapshot_cmd_with_global_flags, setup_snapshot_settings};
use insta_cmd::assert_cmd_snapshot;
use std::process::Command;
/// Helper to create snapshot with normalized paths
fn snapshot_remove(test_name: &str, repo: &TestRepo, args: &[&str], cwd: Option<&std::path::Path>) {
+ snapshot_remove_with_global_flags(test_name, repo, args, cwd, &[]);
+}
+
+/// Helper to create snapshot with global flags (e.g., --internal)
+fn snapshot_remove_with_global_flags(
+ test_name: &str,
+ repo: &TestRepo,
+ args: &[&str],
+ cwd: Option<&std::path::Path>,
+ global_flags: &[&str],
+) {
let settings = setup_snapshot_settings(repo);
settings.bind(|| {
- let mut cmd = make_snapshot_cmd(repo, "remove", args, cwd);
+ let mut cmd = make_snapshot_cmd_with_global_flags(repo, "remove", args, cwd, global_flags);
assert_cmd_snapshot!(test_name, cmd);
});
}
@@ -58,11 +69,12 @@ fn test_remove_internal_mode() {
let worktree_path = repo.add_worktree("feature-internal", "feature-internal");
- snapshot_remove(
+ snapshot_remove_with_global_flags(
"remove_internal_mode",
&repo,
- &["--internal"],
+ &[],
Some(&worktree_path),
+ &["--internal"],
);
}
diff --git a/tests/integration_tests/switch.rs b/tests/integration_tests/switch.rs
index 01c481490..bc0b62749 100644
--- a/tests/integration_tests/switch.rs
+++ b/tests/integration_tests/switch.rs
@@ -1,22 +1,33 @@
-use crate::common::{TestRepo, make_snapshot_cmd, setup_snapshot_settings};
+use crate::common::{TestRepo, make_snapshot_cmd_with_global_flags, setup_snapshot_settings};
use insta_cmd::assert_cmd_snapshot;
use std::path::Path;
/// Helper to create snapshot with normalized paths and SHAs
fn snapshot_switch(test_name: &str, repo: &TestRepo, args: &[&str]) {
- snapshot_switch_with_home(test_name, repo, args, None);
+ snapshot_switch_with_home(test_name, repo, args, None, &[]);
}
-/// Helper that also allows setting a custom HOME directory
+/// Helper to create snapshot with global flags (e.g., --internal)
+fn snapshot_switch_with_global_flags(
+ test_name: &str,
+ repo: &TestRepo,
+ args: &[&str],
+ global_flags: &[&str],
+) {
+ snapshot_switch_with_home(test_name, repo, args, None, global_flags);
+}
+
+/// Helper that also allows setting a custom HOME directory and global flags
fn snapshot_switch_with_home(
test_name: &str,
repo: &TestRepo,
args: &[&str],
temp_home: Option<&Path>,
+ global_flags: &[&str],
) {
let settings = setup_snapshot_settings(repo);
settings.bind(|| {
- let mut cmd = make_snapshot_cmd(repo, "switch", args, None);
+ let mut cmd = make_snapshot_cmd_with_global_flags(repo, "switch", args, None, global_flags);
if let Some(home) = temp_home {
cmd.env("HOME", home);
}
@@ -89,10 +100,11 @@ fn test_switch_internal_mode() {
let repo = TestRepo::new();
repo.commit("Initial commit");
- snapshot_switch(
+ snapshot_switch_with_global_flags(
"switch_internal_mode",
&repo,
- &["--create", "--internal", "internal-test"],
+ &["--create", "internal-test"],
+ &["--internal"],
);
}
@@ -103,10 +115,11 @@ fn test_switch_existing_worktree_internal() {
repo.add_worktree("existing-wt", "existing-wt");
- snapshot_switch(
+ snapshot_switch_with_global_flags(
"switch_existing_internal",
&repo,
- &["--internal", "existing-wt"],
+ &["existing-wt"],
+ &["--internal"],
);
}
@@ -120,16 +133,11 @@ fn test_switch_internal_with_execute() {
#[cfg(target_os = "windows")]
let execute_cmd = "echo line1 && echo line2";
- snapshot_switch(
+ snapshot_switch_with_global_flags(
"switch_internal_with_execute",
&repo,
- &[
- "--create",
- "--internal",
- "exec-internal",
- "--execute",
- execute_cmd,
- ],
+ &["--create", "exec-internal", "--execute", execute_cmd],
+ &["--internal"],
);
}
@@ -296,6 +304,7 @@ command = "{}"
&repo,
&["--create", "no-post-start", "--no-config-commands"],
Some(temp_home.path()),
+ &[],
);
}
@@ -351,5 +360,6 @@ fn test_switch_no_config_commands_with_force() {
"--no-config-commands",
],
Some(temp_home.path()),
+ &[],
);
}
diff --git a/tests/snapshots/integration__integration_tests__init__init_bash.snap b/tests/snapshots/integration__integration_tests__init__init_bash.snap
index c464c1ada..725539301 100644
--- a/tests/snapshots/integration__integration_tests__init__init_bash.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_bash.snap
@@ -81,7 +81,7 @@ if command -v wt >/dev/null 2>&1; then
switch|remove|merge)
# Commands that need --internal for directory change support
shift
- _wt_exec "$subcommand" --internal "$@"
+ _wt_exec --internal "$subcommand" "$@"
;;
*)
# All other commands pass through directly
diff --git a/tests/snapshots/integration__integration_tests__init__init_bash_custom_prefix.snap b/tests/snapshots/integration__integration_tests__init__init_bash_custom_prefix.snap
index 6f541f1a1..95b8a5333 100644
--- a/tests/snapshots/integration__integration_tests__init__init_bash_custom_prefix.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_bash_custom_prefix.snap
@@ -83,7 +83,7 @@ if command -v wt >/dev/null 2>&1; then
switch|remove|merge)
# Commands that need --internal for directory change support
shift
- _wt_exec "$subcommand" --internal "$@"
+ _wt_exec --internal "$subcommand" "$@"
;;
*)
# All other commands pass through directly
diff --git a/tests/snapshots/integration__integration_tests__init__init_fish.snap b/tests/snapshots/integration__integration_tests__init__init_fish.snap
index ddeb266a8..e267ad349 100644
--- a/tests/snapshots/integration__integration_tests__init__init_fish.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_fish.snap
@@ -116,7 +116,7 @@ if type -q wt
switch $subcommand
case switch remove merge
# Commands that need --internal for directory change support
- _wt_exec $subcommand --internal $argv[2..-1]
+ _wt_exec --internal $subcommand $argv[2..-1]
case '*'
# All other commands pass through directly
command $_WORKTRUNK_CMD $argv
@@ -141,7 +141,7 @@ end
# Static completions (commands and flags)
# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.
function __fish_wt_global_optspecs
- string join \n v/verbose h/help V/version
+ string join \n v/verbose internal h/help V/version
end
function __fish_wt_needs_command
diff --git a/tests/snapshots/integration__integration_tests__init__init_zsh.snap b/tests/snapshots/integration__integration_tests__init__init_zsh.snap
index 5735d1fa7..f015effdb 100644
--- a/tests/snapshots/integration__integration_tests__init__init_zsh.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_zsh.snap
@@ -81,7 +81,7 @@ if command -v wt >/dev/null 2>&1; then
switch|remove|merge)
# Commands that need --internal for directory change support
shift
- _wt_exec "$subcommand" --internal "$@"
+ _wt_exec --internal "$subcommand" "$@"
;;
*)
# All other commands pass through directly
diff --git a/tests/snapshots/integration__integration_tests__list__detached_head.snap b/tests/snapshots/integration__integration_tests__list__detached_head.snap
index ce5b65f24..84ca33b34 100644
--- a/tests/snapshots/integration__integration_tests__list__detached_head.snap
+++ b/tests/snapshots/integration__integration_tests__list__detached_head.snap
@@ -18,8 +18,8 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch  Age  Commit  Message  Path
-(detached) 9 months ago b834638e Initial commit .
+Branch  Age  Commit  Message  Path
+(detached) 10 months ago b834638e Initial commit .
Showing 1 worktree
diff --git a/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap b/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap
index 6c9d1454a..785012b4d 100644
--- a/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap
+++ b/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap
@@ -18,9 +18,9 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch  Age  Commit  State  Path
-main  9 months ago b834638e ./test-repo
-locked-no-reason 9 months ago b834638e (locked) ./locked-no-reason
+Branch  Age  Commit  State  Path
+main  10 months ago b834638e ./test-repo
+locked-no-reason 10 months ago b834638e (locked) ./locked-no-reason
Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__locked_worktree.snap b/tests/snapshots/integration__integration_tests__list__locked_worktree.snap
index 3c689f46b..b7f493746 100644
--- a/tests/snapshots/integration__integration_tests__list__locked_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__list__locked_worktree.snap
@@ -18,9 +18,9 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch  Age  Commit  Message  Path
-main  9 months ago b834638e Initial commit ./test-repo
-locked-feature 9 months ago b834638e Initial commit ./locked-feature
+Branch  Age  Commit  Message  Path
+main  10 months ago b834638e Initial commit ./test-repo
+locked-feature 10 months ago b834638e Initial commit ./locked-feature
Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__long_commit_message.snap b/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
index bb3ee2d78..317e2f249 100644
--- a/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
+++ b/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
@@ -18,9 +18,9 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch  Age  Commit  Message  Path
-main  9 months ago 1310bfb9 Short message ./test-repo
-feature-a 9 months ago f078644e This is a very long commit... ./feature-a
+Branch  Age  Commit  Message  Path
+main  10 months ago 1310bfb9 Short message ./test-repo
+feature-a 10 months ago f078644e This is a very long commit... ./feature-a
Showing 2 worktrees, 1 behind
diff --git a/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap b/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap
index dda93cc06..0b2026b27 100644
--- a/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap
+++ b/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap
@@ -18,12 +18,12 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch  Age  Commit  Path
-main  9 months ago b834638e ./test-repo
-medium-name 9 months ago b834638e ./medium-name
-short 9 months ago b834638e ./short
-very-long-branch-name-here 9 months ago b834638e ./very-long-branch-name-here
-with-changes 9 months ago b834638e ./with-changes
+Branch  Commit  Path
+main  b834638e ./test-repo
+medium-name b834638e ./medium-name
+short b834638e ./short
+very-long-branch-name-here b834638e ./very-long-branch-name-here
+with-changes b834638e ./with-changes
Showing 5 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap b/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap
index cfd3b104d..ea04989b2 100644
--- a/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap
+++ b/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap
@@ -18,10 +18,10 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch  Age  Commit  Message  Path
-main  9 months ago b834638e Initial commit ./test-repo
-feature-a 9 months ago b834638e Initial commit ./feature-a
-feature-b 9 months ago b834638e Initial commit ./feature-b
+Branch  Age  Commit  Message  Path
+main  10 months ago b834638e Initial commit ./test-repo
+feature-a 10 months ago b834638e Initial commit ./feature-a
+feature-b 10 months ago b834638e Initial commit ./feature-b
Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__single_worktree.snap b/tests/snapshots/integration__integration_tests__list__single_worktree.snap
index d88bda201..4e75a70be 100644
--- a/tests/snapshots/integration__integration_tests__list__single_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__list__single_worktree.snap
@@ -18,8 +18,8 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch Age  Commit  Message  Path
-main  9 months ago b834638e Initial commit .
+Branch Age  Commit  Message  Path
+main  10 months ago b834638e Initial commit .
Showing 1 worktree
diff --git a/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap b/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
index 1c019a848..9389a896e 100644
--- a/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
+++ b/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
@@ -18,9 +18,9 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch  Age  Commit  Message  Path
-main  9 months ago e4614cb7 Fix bug with cafΓ© β˜•... ./test-repo
-feature-test 9 months ago 0c53695b Add support for... ./feature-test
+Branch  Age  Commit  Message  Path
+main  10 months ago e4614cb7 Fix bug with cafΓ©... ./test-repo
+feature-test 10 months ago 0c53695b Add support for... ./feature-test
Showing 2 worktrees, 1 behind
diff --git a/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap b/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap
index f314c31f2..f484eb072 100644
--- a/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap
@@ -19,12 +19,12 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch  Age  Commit  Path
-main  9 months ago b834638e ./test-repo
-feature-with-worktree 9 months ago b834638e ./feature-with-worktree
-another-branch 9 months ago b834638e
-feature-without-worktree 9 months ago b834638e
-fix-bug 9 months ago b834638e
+Branch  Age  Commit  Path
+main  10 months ago b834638e ./test-repo
+feature-with-worktree 10 months ago b834638e ./feature-with-worktree
+another-branch 10 months ago b834638e
+feature-without-worktree 10 months ago b834638e
+fix-bug 10 months ago b834638e
Showing 2 worktrees, 3 branches
diff --git a/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap b/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap
index 0af8cf4c0..55606ca12 100644
--- a/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap
@@ -19,10 +19,10 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch  Age  Commit  Message  Path
-main  9 months ago b834638e Initial commit ./test-repo
-feature-a 9 months ago b834638e Initial commit ./feature-a
-feature-b 9 months ago b834638e Initial commit ./feature-b
+Branch  Age  Commit  Message  Path
+main  10 months ago b834638e Initial commit ./test-repo
+feature-a 10 months ago b834638e Initial commit ./feature-a
+feature-b 10 months ago b834638e Initial commit ./feature-b
Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap b/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap
index 062034523..564bb0691 100644
--- a/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap
@@ -19,11 +19,11 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch  Age  Commit  Message  Path
-main  9 months ago b834638e Initial commit .
-branch-alpha 9 months ago b834638e Initial commit
-branch-beta 9 months ago b834638e Initial commit
-branch-gamma 9 months ago b834638e Initial commit
+Branch  Age  Commit  Message  Path
+main  10 months ago b834638e Initial commit .
+branch-alpha 10 months ago b834638e Initial commit
+branch-beta 10 months ago b834638e Initial commit
+branch-gamma 10 months ago b834638e Initial commit
Showing 1 worktrees, 3 branches
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap
index c60162b57..03b049805 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap
@@ -19,11 +19,11 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch  Age  WT +/- Commit  Message  Path
-main  9 months ago b834638e Initial commit ./test-repo
-also-no-changes 9 months ago b834638e Initial commit ./also-no-changes
-no-changes 9 months ago b834638e Initial commit ./no-changes
-with-changes 9 months ago +1 -1 b834638e Initial commit ./with-changes
+Branch  Age  WT +/- Commit  Message  Path
+main  10 months ago b834638e Initial commit ./test-repo
+also-no-changes 10 months ago b834638e Initial commit ./also-no-changes
+no-changes 10 months ago b834638e Initial commit ./no-changes
+with-changes 10 months ago +1 -1 b834638e Initial commit ./with-changes
Showing 4 worktrees, 1 with changes
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap
index 0f5afa4e3..cd93868b6 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap
@@ -19,10 +19,10 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch Age  WT +/- Commit  Message  Path
-main  9 months ago b834638e Initial commit ./test-repo
-huge 9 months ago b834638e Initial commit ./huge
-tiny 9 months ago +1 -1 b834638e Initial commit ./tiny
+Branch Age  WT +/- Commit  Message  Path
+main  10 months ago b834638e Initial commit ./test-repo
+huge 10 months ago b834638e Initial commit ./huge
+tiny 10 months ago +1 -1 b834638e Initial commit ./tiny
Showing 3 worktrees, 1 with changes
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap
index 08d925d7d..2afb905be 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap
@@ -19,11 +19,11 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch  Age  Commit  Message  Path
-main  9 months ago b834638e Initial commit ./test-repo
-feature-large 9 months ago b834638e Initial commit ./feature-large
-feature-medium 9 months ago b834638e Initial commit ./feature-medium
-feature-small 9 months ago b834638e Initial commit ./feature-small
+Branch  Age  Commit  Message  Path
+main  10 months ago b834638e Initial commit ./test-repo
+feature-large 10 months ago b834638e Initial commit ./feature-large
+feature-medium 10 months ago b834638e Initial commit ./feature-medium
+feature-small 10 months ago b834638e Initial commit ./feature-small
Showing 4 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
index 4c7ed988d..a9224e430 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
@@ -18,11 +18,11 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch Age  Commit  Message  Path
-main  9 months ago b834638e Initial commit ./test-repo
-a 9 months ago b834638e Initial commit ./a
-bb 9 months ago b834638e Initial commit ./bb
-ccc 9 months ago b834638e Initial commit ./ccc
+Branch Age  Commit  Message  Path
+main  10 months ago b834638e Initial commit ./test-repo
+a 10 months ago b834638e Initial commit ./a
+bb 10 months ago b834638e Initial commit ./bb
+ccc 10 months ago b834638e Initial commit ./ccc
Showing 4 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_120.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_120.snap
index 481f3afd7..09a0a5b1e 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_120.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_120.snap
@@ -19,10 +19,10 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch  Age  Commit  Message  Path
-main  9 months ago a7bc47ca Initial commit with a reasonably long message ./test-repo
-feature-a 9 months ago a7bc47ca Initial commit with a reasonably long message ./feature-a
-feature-b 9 months ago a7bc47ca Initial commit with a reasonably long message ./feature-b
+Branch  Age  Commit  Message  Path
+main  10 months ago a7bc47ca Initial commit with a reasonably long message ./test-repo
+feature-a 10 months ago a7bc47ca Initial commit with a reasonably long message ./feature-a
+feature-b 10 months ago a7bc47ca Initial commit with a reasonably long message ./feature-b
Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_150.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_150.snap
index 4cebf9fa9..84b5a52e6 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_150.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_150.snap
@@ -19,10 +19,10 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch  Age  Commit  Message  Path
-main  9 months ago a7bc47ca Initial commit with a reasonably long message ./test-repo
-feature-a 9 months ago a7bc47ca Initial commit with a reasonably long message ./feature-a
-feature-b 9 months ago a7bc47ca Initial commit with a reasonably long message ./feature-b
+Branch  Age  Commit  Message  Path
+main  10 months ago a7bc47ca Initial commit with a reasonably long message ./test-repo
+feature-a 10 months ago a7bc47ca Initial commit with a reasonably long message ./feature-a
+feature-b 10 months ago a7bc47ca Initial commit with a reasonably long message ./feature-b
Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_80.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_80.snap
index 22802baae..92e6524e3 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_80.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_80.snap
@@ -19,10 +19,10 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch  Age  Commit  Message  Path
-main  9 months ago a7bc47ca Initial commit with a... ./test-repo
-feature-a 9 months ago a7bc47ca Initial commit with a... ./feature-a
-feature-b 9 months ago a7bc47ca Initial commit with a... ./feature-b
+Branch  Age  Commit  Message  Path
+main  10 months ago a7bc47ca Initial commit with a... ./test-repo
+feature-a 10 months ago a7bc47ca Initial commit with a... ./feature-a
+feature-b 10 months ago a7bc47ca Initial commit with a... ./feature-b
Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
index ff6d67660..d5f978b76 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
@@ -18,11 +18,11 @@ info:
success: true
exit_code: 0
----- stdout -----
-Branch Age  Commit  Message  Path
-main  9 months ago b834638e Initial commit ./test-repo
-cafe 9 months ago b834638e Initial commit ./cafΓ©
-naive 9 months ago b834638e Initial commit ./naΓ―ve
-resume 9 months ago b834638e Initial commit ./rΓ©sumΓ©
+Branch Age  Commit  Message  Path
+main  10 months ago b834638e Initial commit ./test-repo
+cafe 10 months ago b834638e Initial commit ./cafΓ©
+naive 10 months ago b834638e Initial commit ./naΓ―ve
+resume 10 months ago b834638e Initial commit ./rΓ©sumΓ©
Showing 4 worktrees