Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Display hint for single commit merge squash
Maximilian Roosf01c79df54e8
diff --git a/src/commands/merge.rs b/src/commands/merge.rsindex 001969082..6d3058dc8 100644--- a/src/commands/merge.rs+++ b/src/commands/merge.rs@@ -1,6 +1,6 @@use worktrunk::config::{ProjectConfig, WorktrunkConfig};use worktrunk::git::{GitError, GitResultExt, Repository};-use worktrunk::styling::{AnstyleStyle, CYAN, CYAN_BOLD, format_with_gutter};+use worktrunk::styling::{AnstyleStyle, CYAN, CYAN_BOLD, HINT, HINT_EMOJI, format_with_gutter};use super::command_executor::{CommandContext, prepare_project_commands};use super::worktree::handle_push;@@ -262,9 +262,8 @@ fn handle_squash(target_branch: &str) -> Result<Option<usize>, GitError> {if commit_count == 1 && !has_staged {// Single commit, no staged changes - nothing to do- let dim = AnstyleStyle::new().dimmed();- crate::output::progress(format!(- "{dim}Only 1 commit since {CYAN_BOLD}{target_branch}{CYAN_BOLD:#} - no squashing needed{dim:#}"+ crate::output::hint(format!(+ "{HINT_EMOJI} {HINT}Only 1 commit since {CYAN_BOLD}{target_branch}{CYAN_BOLD:#} - no squashing needed{HINT:#}"))?;return Ok(None);}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 bdc346da7..1a1f97949 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@@ -17,12 +17,12 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpJHQMgc/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpVJnMrc/test-config.toml---success: trueexit_code: 0----- stdout ------[2mOnly 1 commit since [1m[36mmain[0m - no squashing needed[0m+π‘ [2mOnly 1 commit since [1m[36mmain[0m - no squashing needed[0mπ [36mRebasing onto [1m[36mmain[0m...[0mπ [36mMerging 1 commit to [1m[36mmain[0m @ [SHA][0m