Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Remove redundant parenthesized text from squash message
Maximilian Roosed5366261d9a
diff --git a/CLAUDE.md b/CLAUDE.mdindex 1ea56ec7c..064fbb8b0 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -63,6 +63,26 @@ When users provide explicit arguments (flags, options, values), the output shoul- Don't just use defaults silently—show what was chosen- For optional arguments, conditionally include them in the message+**Avoid redundant parenthesized content:**++Parenthesized text should add new information, not restate what's already said. If the parentheses just rephrase the main message in different words, remove them.++```rust+// ❌ BAD - parentheses restate "no changes"+"No changes after squashing 3 commits (commits resulted in no net changes)"++// ✅ GOOD - clear and concise+"No changes after squashing 3 commits"++// ✅ GOOD - parentheses add supplementary info (stats)+"Committing with default message... (3 files, +45, -12)"++// ✅ GOOD - parentheses explain why+"Worktree preserved (--no-remove)"+```++When reviewing messages, ask: "Does the parenthesized text add information, or just reword what's already clear?"+### The anstyle EcosystemAll styling uses the **anstyle ecosystem** for composable, auto-detecting terminal output:diff --git a/src/commands/beta.rs b/src/commands/beta.rsindex 29c8b2468..9bac29b37 100644--- a/src/commands/beta.rs+++ b/src/commands/beta.rs@@ -251,7 +251,7 @@ pub fn handle_beta_squash(if !repo.has_staged_changes()? {let dim = AnstyleStyle::new().dimmed();crate::output::info(format!(- "{dim}No changes after squashing {commit_count} {commit_text} (commits resulted in no net changes){dim:#}"+ "{dim}No changes after squashing {commit_count} {commit_text}{dim:#}"))?;return Ok(false);}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 b1bb4a99b..d50501e76 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/.tmpy6rjfB/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpn0ZfDz/test-config.toml---success: trueexit_code: 0@@ -30,7 +30,7 @@ exit_code: 0[40m [0m - Change 1[40m [0m - Change 2[40m [0m - Revert to initial-⚪ [2mNo changes after squashing 3 commits (commits resulted in no net changes)[0m+⚪ [2mNo changes after squashing 3 commits[0m✅ [32mMerged to [1m[32mmain[0m[0m✅ [32mReturned to primary at [1m[32m[REPO][0m[0m🔄 [36mRemoving worktree & branch...[0m