Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Refactor: Remove detailed merge summary output
Maximilian Roos458249e912ec
diff --git a/src/commands/merge.rs b/src/commands/merge.rsindex c6bb6e000..8cd909612 100644--- a/src/commands/merge.rs+++ b/src/commands/merge.rs@@ -108,40 +108,14 @@ pub fn handle_merge(/// Print a comprehensive summary of the merge operationfn print_merge_summary(- from_branch: &str,- to_branch: &str,- squashed_count: Option<usize>,- cleaned_up: bool,+ _from_branch: &str,+ _to_branch: &str,+ _squashed_count: Option<usize>,+ _cleaned_up: bool,) {let green = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));- let green_bold = green.bold();- let dim = AnstyleStyle::new().dimmed();println!("β {green}Merge complete{green:#}");- println!();-- // Summary of operations- let mut operations = Vec::new();-- if let Some(count) = squashed_count {- operations.push(format!("Squashed {count} commits into 1"));- }-- operations.push(format!(- "Rebased {green_bold}{from_branch}{green_bold:#} onto {green_bold}{to_branch}{green_bold:#}"- ));-- operations.push(format!("Pushed to {green_bold}{to_branch}{green_bold:#}"));-- if cleaned_up {- operations.push("Cleaned up worktree".to_string());- } else {- operations.push("Preserved worktree".to_string());- }-- for (i, op) in operations.iter().enumerate() {- println!(" {dim}{}. {}{dim:#}", i + 1, op);- }}fn handle_squash(target_branch: &str) -> Result<Option<usize>, GitError> {diff --git a/src/commands/worktree.rs b/src/commands/worktree.rsindex 6b1daa70b..b50e05e5c 100644--- a/src/commands/worktree.rs+++ b/src/commands/worktree.rs@@ -684,9 +684,10 @@ pub fn handle_push(target: Option<&str>, allow_merge_commits: bool) -> Result<());println!();- // Show the commit graph+ // Show the commit graph with colorlet log_output = repo.run_command(&["log",+ "--color=always","--graph","--oneline","--decorate",@@ -695,13 +696,16 @@ pub fn handle_push(target: Option<&str>, allow_merge_commits: bool) -> Result<()println!("{}", log_output.trim());println!();- // Show diff statistics- let diff_stat =- repo.run_command(&["diff", "--stat", &format!("{}..HEAD", target_branch)])?;+ // Show diff statistics with color+ let diff_stat = repo.run_command(&[+ "diff",+ "--color=always",+ "--stat",+ &format!("{}..HEAD", target_branch),+ ])?;if !diff_stat.trim().is_empty() {- let dim = AnstyleStyle::new().dimmed();- println!("{dim}{}{dim:#}", diff_stat.trim());+ println!("{}", diff_stat.trim());println!();}}diff --git a/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap b/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snapindex d77ba9508..0e61ca802 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap@@ -22,10 +22,10 @@ exit_code: 0π [36mRebasing onto [1m[36mmain[0m...[0mπ [36mPushing 1 commit to [1m[36mmain[0m @ [SHA][0m-* [SHA] (HEAD -> feature) Add feature file+* [33m6551244[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Add feature file-[2mfeature.txt | 1 +- 1 file changed, 1 insertion(+)[0m+feature.txt | 1 [32m+[m+ 1 file changed, 1 insertion(+)β [32mPushed to [1m[32mmain[0m (1 commit, 1 file, [32m+1[0m) [0mπ [36mCleaning up worktree...[0m@@ -36,8 +36,4 @@ To enable automatic cd, run: wt configure-shellβ [32mMerge complete[0m- [2m1. Rebased [1m[32mfeature[0m onto [1m[32mmain[0m[0m- [2m2. Pushed to [1m[32mmain[0m[0m- [2m3. Cleaned up worktree[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 d77ba9508..31c35de65 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@@ -22,10 +22,10 @@ exit_code: 0π [36mRebasing onto [1m[36mmain[0m...[0mπ [36mPushing 1 commit to [1m[36mmain[0m @ [SHA][0m-* [SHA] (HEAD -> feature) Add feature file+* [33m4af48f0[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Add feature file-[2mfeature.txt | 1 +- 1 file changed, 1 insertion(+)[0m+feature.txt | 1 [32m+[m+ 1 file changed, 1 insertion(+)β [32mPushed to [1m[32mmain[0m (1 commit, 1 file, [32m+1[0m) [0mπ [36mCleaning up worktree...[0m@@ -36,8 +36,4 @@ To enable automatic cd, run: wt configure-shellβ [32mMerge complete[0m- [2m1. Rebased [1m[32mfeature[0m onto [1m[32mmain[0m[0m- [2m2. Pushed to [1m[32mmain[0m[0m- [2m3. Cleaned up worktree[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 af7e3e674..469e4b44e 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap@@ -25,12 +25,12 @@ exit_code: 0π [36mRebasing onto [1m[36mmain[0m...[0mπ [36mPushing 1 commit to [1m[36mmain[0m @ [SHA][0m-* [SHA] (HEAD -> feature) Squash commits from main+* [33m27eb169[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Squash commits from main-[2mfile1.txt | 1 +- file2.txt | 1 +- file3.txt | 1 +- 3 files changed, 3 insertions(+)[0m+file1.txt | 1 [32m+[m+ file2.txt | 1 [32m+[m+ file3.txt | 1 [32m+[m+ 3 files changed, 3 insertions(+)β [32mPushed to [1m[32mmain[0m (1 commit, 3 files, [32m+3[0m) [0mπ [36mCleaning up worktree...[0m@@ -41,10 +41,5 @@ To enable automatic cd, run: wt configure-shellβ [32mMerge complete[0m- [2m1. Squashed 3 commits into 1[0m- [2m2. Rebased [1m[32mfeature[0m onto [1m[32mmain[0m[0m- [2m3. Pushed to [1m[32mmain[0m[0m- [2m4. Cleaned up worktree[0m------ stderr -----π‘ [33mLLM generation failed, using deterministic message[0mdiff --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 cf0393f90..8c6a2c3cf 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@@ -26,11 +26,11 @@ exit_code: 0π [36mRebasing onto [1m[36mmain[0m...[0mπ [36mPushing 1 commit to [1m[36mmain[0m @ [SHA][0m-* [SHA] (HEAD -> feature) Squash commits from main+* [33m091f0c5[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Squash commits from main-[2mfile1.txt | 1 +- file2.txt | 1 +- 2 files changed, 2 insertions(+)[0m+file1.txt | 1 [32m+[m+ file2.txt | 1 [32m+[m+ 2 files changed, 2 insertions(+)β [32mPushed to [1m[32mmain[0m (1 commit, 2 files, [32m+2[0m) [0mπ [36mCleaning up worktree...[0m@@ -41,10 +41,5 @@ To enable automatic cd, run: wt configure-shellβ [32mMerge complete[0m- [2m1. Squashed 2 commits into 1[0m- [2m2. Rebased [1m[32mfeature[0m onto [1m[32mmain[0m[0m- [2m3. Pushed to [1m[32mmain[0m[0m- [2m4. Cleaned up worktree[0m------ stderr -----π‘ [33mLLM generation failed, using deterministic message[0mdiff --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 b9d68aa5a..1197a06e8 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@@ -24,10 +24,10 @@ exit_code: 0π [36mRebasing onto [1m[36mmain[0m...[0mπ [36mPushing 1 commit to [1m[36mmain[0m @ [SHA][0m-* [SHA] (HEAD -> feature) feat: single commit+* [33m525a81f[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m feat: single commit-[2mfile1.txt | 1 +- 1 file changed, 1 insertion(+)[0m+file1.txt | 1 [32m+[m+ 1 file changed, 1 insertion(+)β [32mPushed to [1m[32mmain[0m (1 commit, 1 file, [32m+1[0m) [0mπ [36mCleaning up worktree...[0m@@ -38,8 +38,4 @@ To enable automatic cd, run: wt configure-shellβ [32mMerge complete[0m- [2m1. Rebased [1m[32mfeature[0m onto [1m[32mmain[0m[0m- [2m2. Pushed to [1m[32mmain[0m[0m- [2m3. Cleaned up worktree[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 4ca5be98c..27663bd78 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@@ -27,10 +27,10 @@ exit_code: 0π [36mRebasing onto [1m[36mmain[0m...[0mπ [36mPushing 1 commit to [1m[36mmain[0m @ [SHA][0m-* [SHA] (HEAD -> feature) Squash commits from main+* [33mffa5181[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Squash commits from main-[2mauth.txt | 1 +- 1 file changed, 1 insertion(+)[0m+auth.txt | 1 [32m+[m+ 1 file changed, 1 insertion(+)β [32mPushed to [1m[32mmain[0m (1 commit, 1 file, [32m+1[0m) [0mπ [36mCleaning up worktree...[0m@@ -41,10 +41,5 @@ To enable automatic cd, run: wt configure-shellβ [32mMerge complete[0m- [2m1. Squashed 2 commits into 1[0m- [2m2. Rebased [1m[32mfeature[0m onto [1m[32mmain[0m[0m- [2m3. Pushed to [1m[32mmain[0m[0m- [2m4. Cleaned up worktree[0m------ stderr -----π‘ [33mLLM generation failed, using deterministic message[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap b/tests/snapshots/integration__integration_tests__merge__merge_to_default.snapindex 6ba6da291..6d7084036 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap@@ -21,10 +21,10 @@ exit_code: 0π [36mRebasing onto [1m[36mmain[0m...[0mπ [36mPushing 1 commit to [1m[36mmain[0m @ [SHA][0m-* [SHA] (HEAD -> feature) Add feature file+* [33m6551244[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Add feature file-[2mfeature.txt | 1 +- 1 file changed, 1 insertion(+)[0m+feature.txt | 1 [32m+[m+ 1 file changed, 1 insertion(+)β [32mPushed to [1m[32mmain[0m (1 commit, 1 file, [32m+1[0m) [0mπ [36mCleaning up worktree...[0m@@ -35,8 +35,4 @@ To enable automatic cd, run: wt configure-shellβ [32mMerge complete[0m- [2m1. Rebased [1m[32mfeature[0m onto [1m[32mmain[0m[0m- [2m2. Pushed to [1m[32mmain[0m[0m- [2m3. Cleaned up worktree[0m------ stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_with_keep.snap b/tests/snapshots/integration__integration_tests__merge__merge_with_keep.snapindex 8c5c71247..65af24e71 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_with_keep.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_with_keep.snap@@ -23,17 +23,13 @@ exit_code: 0π [36mRebasing onto [1m[36mmain[0m...[0mπ [36mPushing 1 commit to [1m[36mmain[0m @ [SHA][0m-* [SHA] (HEAD -> feature) Add feature file+* [33m6551244[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Add feature file-[2mfeature.txt | 1 +- 1 file changed, 1 insertion(+)[0m+feature.txt | 1 [32m+[m+ 1 file changed, 1 insertion(+)β [32mPushed to [1m[32mmain[0m (1 commit, 1 file, [32m+1[0m) [0mβ [32mMerge complete[0m- [2m1. Rebased [1m[32mfeature[0m onto [1m[32mmain[0m[0m- [2m2. Pushed to [1m[32mmain[0m[0m- [2m3. Preserved worktree[0m------ stderr -----diff --git a/tests/snapshots/integration__integration_tests__push__push_fast_forward.snap b/tests/snapshots/integration__integration_tests__push__push_fast_forward.snapindex e218e0d2f..6e60e5d65 100644--- a/tests/snapshots/integration__integration_tests__push__push_fast_forward.snap+++ b/tests/snapshots/integration__integration_tests__push__push_fast_forward.snap@@ -21,10 +21,10 @@ exit_code: 0----- stdout -----π [36mPushing 1 commit to [1m[36mmain[0m @ [SHA][0m-* [SHA] (HEAD -> feature) Add test file+* [33mc2e2bcc[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Add test file-[2mtest.txt | 1 +- 1 file changed, 1 insertion(+)[0m+test.txt | 1 [32m+[m+ 1 file changed, 1 insertion(+)β [32mPushed to [1m[32mmain[0m (1 commit, 1 file, [32m+1[0m) [0mdiff --git a/tests/snapshots/integration__integration_tests__push__push_not_fast_forward.snap b/tests/snapshots/integration__integration_tests__push__push_not_fast_forward.snapindex fd6d53216..905765756 100644--- a/tests/snapshots/integration__integration_tests__push__push_not_fast_forward.snap+++ b/tests/snapshots/integration__integration_tests__push__push_not_fast_forward.snap@@ -21,10 +21,10 @@ exit_code: 0----- stdout -----π [36mPushing 1 commit to [1m[36mmain[0m @ [SHA][0m-* [SHA] (HEAD -> feature) Add feature file+* [33m4af48f0[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Add feature file-[2mfeature.txt | 1 +- 1 file changed, 1 insertion(+)[0m+feature.txt | 1 [32m+[m+ 1 file changed, 1 insertion(+)β [32mPushed to [1m[32mmain[0m (1 commit, 1 file, [32m+1[0m) [0mdiff --git a/tests/snapshots/integration__integration_tests__push__push_to_default.snap b/tests/snapshots/integration__integration_tests__push__push_to_default.snapindex 0f206765c..956ce36f5 100644--- a/tests/snapshots/integration__integration_tests__push__push_to_default.snap+++ b/tests/snapshots/integration__integration_tests__push__push_to_default.snap@@ -20,10 +20,10 @@ exit_code: 0----- stdout -----π [36mPushing 1 commit to [1m[36mmain[0m @ [SHA][0m-* [SHA] (HEAD -> feature) Add feature file+* [33m6551244[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Add feature file-[2mfeature.txt | 1 +- 1 file changed, 1 insertion(+)[0m+feature.txt | 1 [32m+[m+ 1 file changed, 1 insertion(+)β [32mPushed to [1m[32mmain[0m (1 commit, 1 file, [32m+1[0m) [0m