Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat(merge): Delete branch after successful merge
Maximilian Roos455a757e8d03
diff --git a/README.md b/README.mdindex ac0142220..aa230649f 100644--- a/README.md+++ b/README.md@@ -23,7 +23,7 @@ $ wt switch --create fix-auth# Agent works, makes changes, then:$ wt merge-π Merging 1 commit to main @ a1b2c3d (no squashing needed, no rebasing needed)+π Merging 1 commit to main @ a1b2c3d (no commit/squash/rebase needed)* a1b2c3d (HEAD -> fix-auth) Implement JWT validation@@ -31,8 +31,8 @@ $ wt merge1 file changed, 1 insertion(+)β Merged to main (1 commit, 1 file, +1)-π Cleaning up worktree...β Returned to primary at ../repo/+π Removing worktree & branch...# Shell back in main```@@ -351,8 +351,8 @@ test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fin3 files changed, 3 insertions(+)β Merged to main (1 commit, 3 files, +3)-π Cleaning up worktree...β Returned to primary at ../repo/+π Removing worktree & branch...π Running post-merge: installcargo install --path .diff --git a/src/commands/merge.rs b/src/commands/merge.rsindex 807fc945c..66a546e0d 100644--- a/src/commands/merge.rs+++ b/src/commands/merge.rs@@ -244,8 +244,17 @@ pub fn handle_merge(// This prevents showing "Cleaning up worktree..." before failingrepo.ensure_clean_working_tree()?;- // STEP 2: Emit CD directive (just sets intent, doesn't actually change CWD)+ // STEP 2: Emit CD directive and flush - shell executes cd immediatelycrate::output::change_directory(&primary_worktree_dir)?;+ crate::output::flush()?;++ // Show success message now that user has been cd'd to primary+ use worktrunk::styling::{GREEN, SUCCESS_EMOJI};+ let green_bold = GREEN.bold();+ crate::output::success(format!(+ "{SUCCESS_EMOJI} {GREEN}Returned to primary at {green_bold}{}{green_bold:#}{GREEN:#}",+ primary_worktree_dir.display()+ ))?;// STEP 3: Switch to target branch in primary worktree (fails safely if there's an issue)let primary_repo = Repository::at(&primary_worktree_dir);@@ -259,14 +268,14 @@ pub fn handle_merge(.git_context(&format!("Failed to switch to '{}'", target_branch))?;}- // STEP 4: Only NOW remove the worktree (after all checks passed)- crate::output::progress(format!("π {CYAN}Cleaning up worktree...{CYAN:#}"))?;+ // STEP 4: Remove worktree and delete branch+ crate::output::progress(format!("π {CYAN}Removing worktree & branch...{CYAN:#}"))?;let worktree_root = repo.worktree_root()?;repo.remove_worktree(&worktree_root).git_context("Failed to remove worktree")?;-- // Print comprehensive summary- handle_merge_summary_output(Some(&primary_worktree_dir))?;+ primary_repo+ .run_command(&["branch", "-d", ¤t_branch])+ .git_context(&format!("Failed to delete branch '{}'", current_branch))?;} else {// Print comprehensive summary (worktree preserved)handle_merge_summary_output(None)?;diff --git a/src/main.rs b/src/main.rsindex 8290e9dd1..c6f3198aa 100644--- a/src/main.rs+++ b/src/main.rs@@ -236,9 +236,9 @@ The merge operation follows a strict order designed for fail-fast execution:Fast-forward pushes to target branch. Rejects non-fast-forward pushes (ensureslinear history).-7. Clean up worktree- Removes current worktree and switches primary worktree to target branch if needed.- Skip removal with --no-remove.+7. Clean up worktree and branch+ Removes current worktree, deletes the branch, and switches primary worktree to target+ branch if needed. Skip removal with --no-remove.EXAMPLESdiff --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 0211ddbca..9b3c94e43 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@@ -25,5 +25,5 @@ expression: output.normalized()1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[TMPDIR]/test-repo[0m[0m+π [36mRemoving worktree & branch...[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 1a3aab5ba..6ae3957c9 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@@ -25,5 +25,5 @@ expression: output.normalized()1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[TMPDIR]/test-repo[0m[0m+π [36mRemoving worktree & branch...[0mdiff --git a/tests/snapshots/integration__integration_tests__directives__merge_internal_remove.snap b/tests/snapshots/integration__integration_tests__directives__merge_internal_remove.snapindex 3bebed9cd..4192fb4cb 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 7ce023f58..6d42954e7 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/.tmpvtYDLe/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp6yDfRj/test-config.toml---success: trueexit_code: 0@@ -42,7 +42,7 @@ exit_code: 02 files changed, 2 insertions(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 2 files, [32m+2[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 d16c2c243..3f2544550 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/.tmpXGnU03/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpl4Ngge/test-config.toml---success: trueexit_code: 0@@ -38,7 +38,7 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 ca48a3137..93f96b75c 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/.tmpCbiDKo/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpfuuT3c/test-config.toml---success: trueexit_code: 0@@ -40,7 +40,7 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 f234b3517..eba14fc88 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/.tmphjpNKM/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp2GupfH/test-config.toml---success: trueexit_code: 0@@ -35,7 +35,7 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 9de2601b2..54414004f 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpL6eu0T/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpARs0mq/test-config.toml---success: trueexit_code: 0@@ -29,7 +29,7 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 697ff9862..90243a9c7 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_no_commits.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_commits.snap@@ -16,14 +16,14 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpK27W9C/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpi7mVle/test-config.toml---success: trueexit_code: 0----- stdout -----[2mNo commits to squash - already at merge base[0mβ [32mMerged to [1m[32mmain[0m[0m-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 64151d942..1e00efbc8 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/.tmpX3HlOi/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpcpkqaJ/test-config.toml---success: trueexit_code: 0@@ -35,7 +35,7 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 3f24a4cb9..c00203b3b 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpZ1mZNK/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpYpaSfZ/test-config.toml---success: trueexit_code: 0@@ -32,7 +32,7 @@ exit_code: 02 files changed, 2 insertions(+)β [32mMerged to [1m[32mmain[0m[0m (2 commits, 2 files, [32m+2[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 347a6303a..d15cbfc0f 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@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpnmXF8t/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpQzXCKf/test-config.toml---success: trueexit_code: 0@@ -29,7 +29,7 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 2facea79d..595793e62 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/.tmpYN9LRf/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpdLTjsu/test-config.toml---success: trueexit_code: 0@@ -30,8 +30,8 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[0mπ [36mRunning post-merge:[0m[40m [0m [1m[34mexit[0m 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 10226753a..1d446449c 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@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpob77Cf/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpwsFyAO/test-config.toml---success: trueexit_code: 0@@ -30,8 +30,8 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[0mπ [36mRunning post-merge: [1mdeploy[0m[0m[40m [0m [1m[34mecho[0m [32m'Deploying branch feature'[0m [36m>[0m deploy.txt[0mdiff --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 ab5ee2207..c5ae9f74c 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@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp854Zys/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpm4Ov6h/test-config.toml---success: trueexit_code: 0@@ -30,8 +30,8 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 c37cf0216..ae4cbb444 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/.tmpIHu3qb/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmppIq5HD/test-config.toml---success: trueexit_code: 0@@ -39,8 +39,8 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[0m----- stderr -----[0mPre-commit check passeddiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snapindex 8f64d867c..455e3ea24 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap@@ -21,5 +21,5 @@ STDERR-FROM-SECOND1 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[0mdiff --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 c55305f02..ee04c3e9c 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@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpPVwD3N/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpXyq9jh/test-config.toml---success: trueexit_code: 0@@ -39,8 +39,8 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[0m----- stderr -----[0m[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snapindex 49b76e885..9a4997211 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpVAcbvf/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpv3ZO3d/test-config.toml---success: trueexit_code: 0@@ -36,8 +36,8 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[0m----- stderr -----[0m[check1] stdout line 1diff --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 ce9cf1620..1ac025517 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@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpfx1gf9/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpzwCZNG/test-config.toml---success: trueexit_code: 0@@ -33,8 +33,8 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 7062caff2..27b14f33f 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@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpu9jXbc/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpvX83KZ/test-config.toml---success: trueexit_code: 0@@ -33,8 +33,8 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[0m----- stderr -----[0mPre-commit check passeddiff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snapindex c94f05d58..11dcdea08 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/.tmpdtrtbG/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp8Kr5DB/test-config.toml---success: trueexit_code: 0@@ -42,7 +42,7 @@ exit_code: 03 files changed, 3 insertions(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 3 files, [32m+3[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 49fdc39df..488463213 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/.tmpcf9s1q/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpJpJry3/test-config.toml---success: trueexit_code: 0@@ -41,7 +41,7 @@ exit_code: 02 files changed, 2 insertions(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 2 files, [32m+2[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 7a3c124b6..8a46c0d17 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@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpdH5Sjv/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpA3k8wG/test-config.toml---success: trueexit_code: 0@@ -29,7 +29,7 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 69cc6d232..5e83673d9 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/.tmpUgMXq5/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpeguL7E/test-config.toml---success: trueexit_code: 0@@ -42,7 +42,7 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 ea8d8ea34..3123e8a04 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap@@ -15,7 +15,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmprjh2Fp/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpS8yVxe/test-config.toml---success: trueexit_code: 0@@ -28,7 +28,7 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 8d351a396..ab3df1ecb 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/.tmpDKCFqS/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp3Qcngq/test-config.toml---success: trueexit_code: 0@@ -43,7 +43,7 @@ exit_code: 03 files changed, 3 insertions(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 3 files, [32m+3[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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 6444e24fe..ffc2b429a 100644--- a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap@@ -16,9 +16,9 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- PATH: "/private/var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpYIUv2V/test-repo/.bin:/Users/maximilian/.cargo/bin:/Users/maximilian/.local/bin:/Users/maximilian/.bun/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"+ PATH: "/private/var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpRAGvvU/test-repo/.bin:/Users/maximilian/.cargo/bin:/Users/maximilian/.local/bin:/Users/maximilian/.bun/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/.tmpYIUv2V/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpRAGvvU/test-config.toml---success: trueexit_code: 0@@ -52,8 +52,8 @@ exit_code: 03 files changed, 3 insertions(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 3 files, [32m+3[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[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_simple.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snapindex 04797e918..068721d8b 100644--- a/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpUz5Wll/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpCWyvn7/test-config.toml---success: trueexit_code: 0@@ -29,7 +29,7 @@ exit_code: 01 file changed, 1 insertion(+)β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-π [36mCleaning up worktree...[0mβ [32mReturned to primary at [1m[32m[REPO][0m[0m+π [36mRemoving worktree & branch...[0m----- stderr -----