Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat(merge): Refactor worktree cleanup destination
Maximilian Roosdb1ea137ece4
diff --git a/src/commands/merge.rs b/src/commands/merge.rsindex 874fa8792..9ca58be4c 100644--- a/src/commands/merge.rs+++ b/src/commands/merge.rs@@ -1,7 +1,7 @@use worktrunk::HookType;use worktrunk::config::{Command, CommandPhase, ProjectConfig};use worktrunk::git::{GitError, Repository};-use worktrunk::styling::{CYAN, CYAN_BOLD, ERROR, ERROR_EMOJI, GREEN_BOLD, HINT, HINT_EMOJI};+use worktrunk::styling::{CYAN, ERROR, ERROR_EMOJI, GREEN_BOLD, HINT, HINT_EMOJI};use super::command_approval::approve_command_batch;use super::command_executor::CommandContext;@@ -175,39 +175,29 @@ pub fn handle_merge(let worktrees = repo.list_worktrees()?;let primary_worktree_dir = worktrees.worktrees[0].path.clone();+ // Determine destination: target branch's worktree if it exists, otherwise primary worktree+ let target_worktree_path = repo.worktree_for_branch(&target_branch)?;+ let destination_path = target_worktree_path+ .as_ref()+ .unwrap_or(&primary_worktree_dir)+ .clone();+// Finish worktree unless --no-remove was specifiedif !no_remove_effective {// STEP 1: Check for uncommitted changes before attempting cleanup// This prevents showing "Cleaning up worktree..." before failingrepo.ensure_clean_working_tree()?;- // STEP 2: Switch to target branch in primary worktree (fails safely if there's an issue)- let primary_repo = Repository::at(&primary_worktree_dir);- let new_branch = primary_repo.current_branch()?;- if new_branch.as_deref() != Some(&target_branch) {- crate::output::progress(format!(- "{CYAN}Switching to {CYAN_BOLD}{target_branch}{CYAN_BOLD:#}{CYAN}...{CYAN:#}"- ))?;- if let Err(err) = primary_repo.run_command(&["switch", &target_branch]) {- return Err(match err {- GitError::CommandFailed(msg) => GitError::SwitchFailed {- branch: target_branch.clone(),- error: msg,- },- other => other,- });- }- }-- // STEP 3: Remove worktree via shared remove output handler so final message matches wt remove+ // STEP 2: Remove worktree via shared remove output handler so final message matches wt removecrate::output::progress(format!("{CYAN}Removing worktree & branch...{CYAN:#}"))?;let worktree_root = repo.worktree_root()?;let remove_result = RemoveResult::RemovedWorktree {- primary_path: primary_worktree_dir.clone(),+ primary_path: destination_path.clone(),worktree_path: worktree_root,changed_directory: true,branch_name: current_branch.clone(),no_delete_branch: false,+ target_branch: Some(target_branch.clone()),};crate::output::handle_remove_output(&remove_result, Some(¤t_branch), true)?;} else {@@ -216,17 +206,17 @@ pub fn handle_merge(}if !no_verify {- // Execute post-merge commands in the main worktree+ // Execute post-merge commands in the destination worktree// This runs after cleanup so the context is clear to the user- // Create a fresh Repository instance at the primary worktree (the old repo may be invalid)- let primary_repo = Repository::at(&primary_worktree_dir);- let primary_repo_root = primary_worktree_dir.clone();+ // Create a fresh Repository instance at the destination (the old repo may be invalid)+ let destination_repo = Repository::at(&destination_path);+ let destination_repo_root = destination_path.clone();let ctx = CommandContext::new(- &primary_repo,+ &destination_repo,config,¤t_branch,- &primary_worktree_dir,- &primary_repo_root,+ &destination_path,+ &destination_repo_root,force,);execute_post_merge_commands(&ctx, &target_branch, true)?;diff --git a/src/commands/repository_ext.rs b/src/commands/repository_ext.rsindex c28f828c2..f5f99a177 100644--- a/src/commands/repository_ext.rs+++ b/src/commands/repository_ext.rs@@ -184,6 +184,7 @@ impl RepositoryCliExt for Repository {changed_directory: true,branch_name: current_branch,no_delete_branch,+ target_branch: None,});}@@ -246,6 +247,7 @@ impl RepositoryCliExt for Repository {changed_directory,branch_name: branch_name.to_string(),no_delete_branch,+ target_branch: None,})}diff --git a/src/commands/worktree.rs b/src/commands/worktree.rsindex 5a9c1330e..1fd6ba269 100644--- a/src/commands/worktree.rs+++ b/src/commands/worktree.rs@@ -152,6 +152,7 @@ pub enum RemoveResult {changed_directory: bool,branch_name: String,no_delete_branch: bool,+ target_branch: Option<String>,},/// Switched to default branch in main repoSwitchedToDefault(String),diff --git a/src/output/handlers.rs b/src/output/handlers.rsindex 5b5e103dc..432108581 100644--- a/src/output/handlers.rs+++ b/src/output/handlers.rs@@ -69,12 +69,12 @@ fn format_remove_message(if let Some(b) = branch_display {// Re-establish GREEN after each green_bold reset to prevent color leakformat!(- "{GREEN}{action} for {GREEN_BOLD}{b}{GREEN_BOLD:#}{GREEN}, returned to primary at {GREEN_BOLD}{}{GREEN_BOLD:#}{GREEN:#}",+ "{GREEN}{action} for {GREEN_BOLD}{b}{GREEN_BOLD:#}{GREEN}, changed directory to {GREEN_BOLD}{}{GREEN_BOLD:#}{GREEN:#}",primary_path.display())} else {format!(- "{GREEN}{action}, returned to primary at {GREEN_BOLD}{}{GREEN_BOLD:#}{GREEN:#}",+ "{GREEN}{action}, changed directory to {GREEN_BOLD}{}{GREEN_BOLD:#}{GREEN:#}",primary_path.display())}@@ -151,6 +151,7 @@ pub fn handle_remove_output(changed_directory,branch_name,no_delete_branch,+ target_branch,} = result{// 1. Emit cd directive if needed - shell will execute this immediately@@ -176,13 +177,33 @@ pub fn handle_remove_output(// 3. Delete the branch (unless --no-delete-branch was specified)// Returns true if branch was successfully deleted, false otherwiseif !no_delete_branch {- // Create a Repository instance from the primary path to ensure we're running- // the command from a valid directory (the worktree we just removed may have- // been the current directory)- let primary_repo = worktrunk::git::Repository::at(primary_path);+ let deletion_repo = worktrunk::git::Repository::at(primary_path);++ // Determine what to check against: target branch if specified, otherwise HEAD+ let check_target = target_branch.as_deref().unwrap_or("HEAD");++ // Use git merge-base --is-ancestor to check if branch is merged to target+ // This is the same safety check that `git branch -d` does, but we can specify the target+ let delete_result = match deletion_repo.run_command(&[+ "merge-base",+ "--is-ancestor",+ branch_name,+ check_target,+ ]) {+ Ok(_) => {+ // Branch is an ancestor of target (fully merged), safe to delete+ deletion_repo.run_command(&["branch", "-D", branch_name])+ }+ Err(_) => {+ // Branch is not fully merged to target+ Err(worktrunk::git::GitError::CommandFailed(format!(+ "error: the branch '{}' is not fully merged",+ branch_name+ )))+ }+ };- // Use safe delete (-d) which fails if branch has unmerged commits- match primary_repo.run_command(&["branch", "-d", branch_name]) {+ match delete_result {Ok(_) => true,Err(e) => {if strict_branch_deletion {diff --git a/tests/integration_tests/merge.rs b/tests/integration_tests/merge.rsindex dd9ca946b..bcf55abf2 100644--- a/tests/integration_tests/merge.rs+++ b/tests/integration_tests/merge.rs@@ -2503,8 +2503,8 @@ fn test_merge_primary_on_different_branch() {Some(&feature_wt),);- // Verify primary switched to main after merge- assert_eq!(repo.current_branch(), "main");+ // Verify primary stayed on develop (we don't switch branches, only worktrees)+ assert_eq!(repo.current_branch(), "develop");}#[test]diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_bash.snapindex 39efe6e18..8bdae401d 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_bash.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_bash.snap@@ -29,4 +29,4 @@ expression: output.normalized()[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[TMPDIR]/test-repo[0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[TMPDIR]/test-repo[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_zsh.snapindex 39efe6e18..8bdae401d 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_zsh.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_zsh.snap@@ -29,4 +29,4 @@ expression: output.normalized()[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[TMPDIR]/test-repo[0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[TMPDIR]/test-repo[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snapindex 51f78d8d7..5c1af77ec 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap@@ -18,4 +18,4 @@ expression: output.normalized()[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[TMPDIR]/test-repo[0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[TMPDIR]/test-repo[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snapindex 51f78d8d7..5c1af77ec 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap@@ -18,4 +18,4 @@ expression: output.normalized()[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[TMPDIR]/test-repo[0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[TMPDIR]/test-repo[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__directives__merge_internal_remove.snap b/tests/snapshots/integration__integration_tests__directives__merge_internal_remove.snapindex 718600edd..ae7d32dfb 100644Binary files a/tests/snapshots/integration__integration_tests__directives__merge_internal_remove.snap and b/tests/snapshots/integration__integration_tests__directives__merge_internal_remove.snap differdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snap b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snapindex 5fb73b0a1..c3f09d5ba 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snap@@ -18,7 +18,7 @@ info:SOURCE_DATE_EPOCH: "1761609600"WORKTRUNK_COMMIT_GENERATION__ARGS: "fix: update file 1 content"WORKTRUNK_COMMIT_GENERATION__COMMAND: echo- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpSSwp5e/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpvDIUwx/test-config.toml---success: trueexit_code: 0@@ -40,6 +40,6 @@ exit_code: 0[40m [0m 2 files changed, 2 insertions(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 2 files, [32m+2[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snap b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snapindex 0ece4310f..3c0b2421e 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp3XJFhk/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpVw44sM/test-config.toml---success: trueexit_code: 0@@ -36,6 +36,6 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snap b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snapindex 0c2e71642..55fa001ae 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snap@@ -18,7 +18,7 @@ info:SOURCE_DATE_EPOCH: "1761609600"WORKTRUNK_COMMIT_GENERATION__ARGS: "fix: improve auth validation logic"WORKTRUNK_COMMIT_GENERATION__COMMAND: echo- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpK1SDEB/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpQrDAcA/test-config.toml---success: trueexit_code: 0@@ -38,6 +38,6 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap b/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snapindex e25a60158..2ecb7949c 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpOTMGKu/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpNk2Vkx/test-config.toml---success: trueexit_code: 0@@ -34,6 +34,6 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap b/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snapindex f3bb3b40e..7e258b0c5 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap@@ -12,10 +12,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpBbNoY5/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp0QBfBm/test-config.toml---success: trueexit_code: 0@@ -27,6 +28,6 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_commits.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_commits.snapindex 5463a3ff3..2fe22f5e2 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_no_commits.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_commits.snap@@ -12,16 +12,17 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp0DAZH9/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp6QYAqE/test-config.toml---success: trueexit_code: 0----- stdout -----β [32mMerged to [1m[32mmain[0m[0m (no new commits, no rebase needed)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mno-commits[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mno-commits[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snapindex bb9560b1d..4a9a60e8f 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpaDm0S1/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpMGQMEy/test-config.toml---success: trueexit_code: 0@@ -34,6 +34,6 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mno-commits-dirty[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mno-commits-dirty[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snapindex 1c833387f..d6b8d985c 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap@@ -13,10 +13,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp344tWe/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpvNkMKB/test-config.toml---success: trueexit_code: 0@@ -30,6 +31,6 @@ exit_code: 0[40m [0m 2 files changed, 2 insertions(+)β [32mMerged to [1m[32mmain[0m[0m (2 commits, 2 files, [32m+2[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snap b/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snapindex 2e6c81d61..fcea1b4aa 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snap@@ -12,10 +12,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmph5Mekf/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpUQMOzG/test-config.toml---success: trueexit_code: 0@@ -27,6 +28,6 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snapindex 8d7302142..890c51c0a 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpXK9GZq/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpmjP1io/test-config.toml---success: falseexit_code: 1@@ -29,7 +29,7 @@ exit_code: 1[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0mπ [36mRunning post-merge:[0m[40m [0m [1m[34mexit[0m 1[0mπ‘ [33mCommand failed: exit status: 1[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snapindex 8dd9b7308..b8f5a90da 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap@@ -13,10 +13,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpeKuVqu/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpcihcnx/test-config.toml---success: trueexit_code: 0@@ -28,7 +29,7 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0mπ [36mRunning post-merge [1mnotify[0m:[0m[40m [0m [1m[34mecho[0m [32m'Merge to main complete'[0m [36m>[0m notify.txt[0mπ [36mRunning post-merge [1mdeploy[0m:[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snapindex e0e583126..be0a63180 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snap@@ -14,10 +14,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpUCbYQE/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpbO1jeF/test-config.toml---success: trueexit_code: 0@@ -29,6 +30,6 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snapindex 53c018f84..be5ab3d52 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap@@ -13,10 +13,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpOgfyYr/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp7FRaV5/test-config.toml---success: trueexit_code: 0@@ -28,7 +29,7 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0mπ [36mRunning post-merge:[0m[40m [0m [1m[34mecho[0m [32m'merged feature to main'[0m [36m>[0m post-merge-ran.txt[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snapindex 199385541..03cd79851 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpit6B51/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpvtdLhK/test-config.toml---success: trueexit_code: 0@@ -37,7 +37,7 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----[0mPre-commit check passeddiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snapindex 1081241fd..6b984db04 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap@@ -13,10 +13,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpeSfyqZ/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp6aktDv/test-config.toml---success: trueexit_code: 0@@ -34,7 +35,7 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----[0m[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snapindex 3dbd2c600..ebe5eef14 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap@@ -13,10 +13,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpfBUAox/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpoDPmOC/test-config.toml---success: trueexit_code: 0@@ -30,7 +31,7 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snapindex ec3238030..bd9b260b3 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap@@ -13,10 +13,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpjSvuWj/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpbRfyYy/test-config.toml---success: trueexit_code: 0@@ -30,7 +31,7 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----[0mPre-commit check passeddiff --git a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snap b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snapindex 96ae44bb8..f76ae399a 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snap@@ -12,10 +12,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp8TCe60/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpDt5Nqc/test-config.toml---success: trueexit_code: 0@@ -26,8 +27,7 @@ exit_code: 0[40m [0m feature.txt | 1 [32m+[m[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mSwitching to [1m[36mmain[0m[36m...[0mπ [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature-from-develop[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature-from-develop[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snap b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snapindex 1331d6c04..46050d1dc 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snap@@ -16,10 +16,10 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpxaDqD2/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpXhTLbu/test-config.toml----success: false-exit_code: 1+success: true+exit_code: 0----- stdout -----π [36mRebasing onto [1m[36mmain[0m[36m...[0mβ [32mRebased onto [1m[32mmain[0m[0m@@ -29,12 +29,7 @@ exit_code: 1[40m [0m feature.txt | 1 [32m+[m[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mSwitching to [1m[36mmain[0m[36m...[0m-β [31mFailed to switch to [1m[31mmain[0m[0m-[40m [0m error: Your local changes to the following files would be overwritten by checkout:-[40m [0m file.txt-[40m [0m Please commit your changes or stash them before you switch branches.-[40m [0m Aborting-+π [36mRemoving worktree & branch...[0m+β [32mRemoved worktree & branch for [1m[32mfeature-dirty-primary[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snapindex b8fd16fc7..981defbb1 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpdJuHDk/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmphvQWkH/test-config.toml---success: trueexit_code: 0@@ -40,6 +40,6 @@ exit_code: 0[40m [0m 3 files changed, 3 insertions(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 3 files, [32m+3[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snapindex 4f36215f2..890f4b324 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpX8vgSy/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp0YexFW/test-config.toml---success: trueexit_code: 0@@ -33,6 +33,6 @@ exit_code: 0βͺ [2mNo changes after squashing 3 commits[0mβ [32mMerged to [1m[32mmain[0m[0m (no new commits, no rebase needed)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_fallback.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_fallback.snapindex 0c2483e8d..ba4fc4bbe 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_fallback.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_fallback.snap@@ -17,7 +17,7 @@ info:LC_ALL: CSOURCE_DATE_EPOCH: "1761609600"WORKTRUNK_COMMIT_GENERATION__COMMAND: nonexistent-llm-command- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpfNAwi9/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpjsJ0Qf/test-config.toml---success: trueexit_code: 0@@ -39,6 +39,6 @@ exit_code: 0[40m [0m 2 files changed, 2 insertions(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 2 files, [32m+2[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snapindex 1c5ef01b2..1477e6158 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snap@@ -12,10 +12,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpbGm9rr/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpboIiiA/test-config.toml---success: trueexit_code: 0@@ -27,6 +28,6 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snapindex 840def929..bd18eb234 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snap@@ -19,7 +19,7 @@ info:WORKTRUNK_COMMIT_GENERATION__ARGS__0: "-c"WORKTRUNK_COMMIT_GENERATION__ARGS__1: "cat >/dev/null && echo 'feat: implement user authentication system'"WORKTRUNK_COMMIT_GENERATION__COMMAND: sh- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp3kKR3W/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpOuLIpW/test-config.toml---success: trueexit_code: 0@@ -40,6 +40,6 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap b/tests/snapshots/integration__integration_tests__merge__merge_to_default.snapindex dbc4ee60c..a0513fc64 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap@@ -11,10 +11,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmphLqVJ1/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmphMDEpp/test-config.toml---success: trueexit_code: 0@@ -26,6 +27,6 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snap b/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snapindex 5af9f2e9c..c00b74364 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snap@@ -12,10 +12,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpnUJRO4/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpsc94Ii/test-config.toml---success: trueexit_code: 0@@ -29,6 +30,6 @@ exit_code: 0[40m [0m 1 file changed, 1 insertion(+)β [32mMerged to [1m[32mstaging[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature-for-staging[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature-for-staging[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap b/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snapindex 2f7850f13..b01ca0770 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap@@ -18,7 +18,7 @@ info:SOURCE_DATE_EPOCH: "1761609600"WORKTRUNK_COMMIT_GENERATION__ARGS: "fix: commit changes"WORKTRUNK_COMMIT_GENERATION__COMMAND: echo- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpWPwD37/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp9X1OmC/test-config.toml---success: trueexit_code: 0@@ -43,6 +43,6 @@ exit_code: 0[40m [0m 3 files changed, 3 insertions(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 3 files, [32m+3[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snapindex 77f74df93..019f4ed83 100644--- a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap@@ -1,6 +1,5 @@---source: tests/integration_tests/merge.rs-assertion_line: 29info:program: wtargs:@@ -14,11 +13,12 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: C- PATH: "/private/var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpcSwkET/test-repo/.bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"+ PATH: "/private/var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpXhUJ6w/test-repo/.bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"SOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpcSwkET/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpXhUJ6w/test-config.toml---success: trueexit_code: 0@@ -48,7 +48,7 @@ exit_code: 0[40m [0m 3 files changed, 33 insertions(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 3 files, [32m+33[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature-auth[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature-auth[0m[32m, changed directory to [1m[32m[REPO][0m[0mπ [36mRunning post-merge [1minstall[0m:[0m[40m [0m [1m[34mcargo[0m install [36m--path[0m .[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snapindex 071236f88..663f9f181 100644--- a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snap+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snap@@ -16,9 +16,9 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- PATH: "/private/var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpp9hkDo/test-repo/.bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"+ PATH: "/private/var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpUTUBw4/test-repo/.bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"SOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpp9hkDo/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpUTUBw4/test-config.toml---success: trueexit_code: 0@@ -42,7 +42,7 @@ exit_code: 0[40m [0m 2 files changed, 45 insertions(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 2 files, [32m+45[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfeature-auth[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature-auth[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snapindex 74cac249c..6efdcacbf 100644--- a/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap@@ -1,6 +1,5 @@---source: tests/integration_tests/merge.rs-assertion_line: 11info:program: wtargs:@@ -13,10 +12,11 @@ info:GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpl3Y22A/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpDqs41s/test-config.toml---success: trueexit_code: 0@@ -28,6 +28,6 @@ exit_code: 0[40m [0m 1 file changed, 13 insertions(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+13[0m)π [36mRemoving worktree & branch...[0m-β [32mRemoved worktree & branch for [1m[32mfix-auth[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfix-auth[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__remove__remove_branch_not_fully_merged.snap b/tests/snapshots/integration__integration_tests__remove__remove_branch_not_fully_merged.snapindex b20e0700c..0789d6ffa 100644--- a/tests/snapshots/integration__integration_tests__remove__remove_branch_not_fully_merged.snap+++ b/tests/snapshots/integration__integration_tests__remove__remove_branch_not_fully_merged.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpRUqppL/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp7TLzj2/test-config.toml---success: trueexit_code: 0@@ -24,8 +24,6 @@ exit_code: 0π [36mRemoving worktree for [1m[36mfeature-unmerged[0m...[0mπ‘ [33mCould not delete branch [1m[33mfeature-unmerged[0m[0m[40m [0m error: the branch 'feature-unmerged' is not fully merged-[40m [0m hint: If you are sure you want to delete it, run 'git branch -D feature-unmerged'-[40m [0m hint: Disable this message with "git config set advice.forceDeleteBranch false"β [32mRemoved worktree for [1m[32mfeature-unmerged[0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__remove__remove_current_by_name.snap b/tests/snapshots/integration__integration_tests__remove__remove_current_by_name.snapindex b4de8fc27..3adbadb53 100644--- a/tests/snapshots/integration__integration_tests__remove__remove_current_by_name.snap+++ b/tests/snapshots/integration__integration_tests__remove__remove_current_by_name.snap@@ -16,12 +16,12 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpYF72Ax/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpeD1SRN/test-config.toml---success: trueexit_code: 0----- stdout -----π [36mRemoving worktree for [1m[36mfeature-current[0m...[0m-β [32mRemoved worktree & branch for [1m[32mfeature-current[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature-current[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__remove__remove_from_worktree.snap b/tests/snapshots/integration__integration_tests__remove__remove_from_worktree.snapindex 1a365ce87..3515ca320 100644--- a/tests/snapshots/integration__integration_tests__remove__remove_from_worktree.snap+++ b/tests/snapshots/integration__integration_tests__remove__remove_from_worktree.snap@@ -15,12 +15,12 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpd0RKVq/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpOZr488/test-config.toml---success: trueexit_code: 0----- stdout -----π [36mRemoving worktree...[0m-β [32mRemoved worktree & branch for [1m[32mfeature-wt[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature-wt[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snap b/tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snapindex 59cdaff9b..8da5ff120 100644Binary files a/tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snap and b/tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snap differdiff --git a/tests/snapshots/integration__integration_tests__remove__remove_multiple_including_current.snap b/tests/snapshots/integration__integration_tests__remove__remove_multiple_including_current.snapindex 0c05620bf..ef432897b 100644--- a/tests/snapshots/integration__integration_tests__remove__remove_multiple_including_current.snap+++ b/tests/snapshots/integration__integration_tests__remove__remove_multiple_including_current.snap@@ -18,7 +18,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpC6kt31/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpB8muTV/test-config.toml---success: trueexit_code: 0@@ -28,6 +28,6 @@ exit_code: 0π [36mRemoving worktree for [1m[36mfeature-c[0m...[0mβ [32mRemoved worktree & branch for [1m[32mfeature-c[0m[0mπ [36mRemoving worktree for [1m[36mfeature-a[0m...[0m-β [32mRemoved worktree & branch for [1m[32mfeature-a[0m[32m, returned to primary at [1m[32m[REPO][0m[0m+β [32mRemoved worktree & branch for [1m[32mfeature-a[0m[32m, changed directory to [1m[32m[REPO][0m[0m----- stderr -----