Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat: Add --no-verify and --stage flags for commit operations
Maximilian Roosbac77f9de830
diff --git a/src/commands/commit.rs b/src/commands/commit.rsindex dfb10dca2..22a7ca36a 100644--- a/src/commands/commit.rs+++ b/src/commands/commit.rs@@ -74,15 +74,24 @@ impl<'a> CommitGenerator<'a> {Ok(())}- pub fn commit_staged_changes(&self, show_no_squash_note: bool) -> anyhow::Result<()> {+ pub fn commit_staged_changes(+ &self,+ show_no_squash_note: bool,+ stage_mode: StageMode,+ ) -> anyhow::Result<()> {let repo = Repository::current();let stats_parts = repo.diff_stats_summary(&["diff", "--staged", "--shortstat"]);+ let changes_type = match stage_mode {+ StageMode::Tracked => "tracked changes",+ _ => "changes",+ };+let action = if self.config.is_configured() {- "Generating commit message and committing..."+ format!("Generating commit message and committing {changes_type}...")} else {- "Committing with default message..."+ format!("Committing {changes_type} with default message...")};let mut parts = vec![];@@ -127,11 +136,17 @@ impl<'a> CommitGenerator<'a> {/// Commit uncommitted changes with the shared commit pipeline.impl CommitOptions<'_> {pub fn commit(self) -> anyhow::Result<()> {- if !self.no_verify- && let Some(project_config) = self.ctx.repo.load_project_config()?- {+ let project_config = self.ctx.repo.load_project_config()?;+ let has_pre_commit = project_config+ .as_ref()+ .map(|c| c.pre_commit_command.is_some())+ .unwrap_or(false);++ if self.no_verify && has_pre_commit {+ crate::output::hint("Skipping pre-commit hook (--no-verify)")?;+ } else if let Some(ref config) = project_config {let pipeline = HookPipeline::new(*self.ctx);- pipeline.run_pre_commit(&project_config, self.target_branch, self.auto_trust)?;+ pipeline.run_pre_commit(config, self.target_branch, self.auto_trust)?;}if self.warn_about_untracked && self.stage_mode == StageMode::All {@@ -160,6 +175,6 @@ impl CommitOptions<'_> {}CommitGenerator::new(&self.ctx.config.commit_generation)- .commit_staged_changes(self.show_no_squash_note)+ .commit_staged_changes(self.show_no_squash_note, self.stage_mode)}}diff --git a/src/commands/list/collect_progressive_impl.rs b/src/commands/list/collect_progressive_impl.rsindex 5bd3f4849..794f5ec7f 100644--- a/src/commands/list/collect_progressive_impl.rs+++ b/src/commands/list/collect_progressive_impl.rs@@ -15,6 +15,7 @@ use std::sync::Arc;use std::sync::atomic::{AtomicUsize, Ordering};use worktrunk::git::{LineDiff, Repository, Worktree};use worktrunk::path::format_path_for_display;+use worktrunk::styling::eprintln;use super::ci_status::PrStatus;use super::collect::{CellUpdate, detect_worktree_state};diff --git a/src/commands/standalone.rs b/src/commands/standalone.rsindex c365b204a..496c68aa6 100644--- a/src/commands/standalone.rs+++ b/src/commands/standalone.rs@@ -120,8 +120,16 @@ pub fn handle_squash(}// Run pre-commit hook unless explicitly skipped- if !skip_pre_commit && let Some(project_config) = repo.load_project_config()? {- HookPipeline::new(ctx).run_pre_commit(&project_config, Some(&target_branch), auto_trust)?;+ let project_config = repo.load_project_config()?;+ let has_pre_commit = project_config+ .as_ref()+ .map(|c| c.pre_commit_command.is_some())+ .unwrap_or(false);++ if skip_pre_commit && has_pre_commit {+ crate::output::hint("Skipping pre-commit hook (--no-verify)")?;+ } else if let Some(ref config) = project_config {+ HookPipeline::new(ctx).run_pre_commit(config, Some(&target_branch), auto_trust)?;}// Get merge base with target branch@@ -141,7 +149,7 @@ pub fn handle_squash(if commit_count == 0 && has_staged {// Just staged changes, no commits - commit them directly (no squashing needed)- generator.commit_staged_changes(true)?;+ generator.commit_staged_changes(true, stage_mode)?;return Ok(true);}@@ -168,19 +176,25 @@ pub fn handle_squash(};let with_changes = if has_staged {- " & working tree changes"+ match stage_mode {+ super::commit::StageMode::Tracked => " & tracked changes",+ _ => " & working tree changes",+ }} else {""};- let squash_progress = if total_stats.is_empty() {+ // Build parenthesized content: stats only (stage mode is in message text)+ let parts = total_stats;++ let squash_progress = if parts.is_empty() {format!("{CYAN}Squashing {commit_count} {commit_text}{with_changes} into a single commit...{CYAN:#}")} else {format!("{CYAN}Squashing {commit_count} {commit_text}{with_changes} into a single commit{CYAN:#} ({})...",- total_stats.join(", ")+ parts.join(", "))};crate::output::progress(squash_progress)?;diff --git a/src/config/user.rs b/src/config/user.rsindex a2d1caf0a..dc80484f3 100644--- a/src/config/user.rs+++ b/src/config/user.rs@@ -43,6 +43,17 @@ pub enum StageMode {None,}+impl StageMode {+ /// Returns the lowercase string representation for CLI display.+ pub fn as_str(self) -> &'static str {+ match self {+ StageMode::All => "all",+ StageMode::Tracked => "tracked",+ StageMode::None => "none",+ }+ }+}+/// User-level configuration for worktree path formatting and LLM integration.////// This config is stored at `~/.config/worktrunk/config.toml` (or platform equivalent)diff --git a/tests/integration_tests/merge.rs b/tests/integration_tests/merge.rsindex 8d021dad4..5ce9a51d2 100644--- a/tests/integration_tests/merge.rs+++ b/tests/integration_tests/merge.rs@@ -2952,3 +2952,307 @@ fn test_merge_does_not_permanently_set_receive_deny_current_branch() {after_value);}++/// Helper to snapshot step squash with env vars+fn snapshot_step_squash_with_env(+ test_name: &str,+ repo: &TestRepo,+ args: &[&str],+ cwd: Option<&Path>,+ env_vars: &[(&str, &str)],+) {+ let settings = setup_snapshot_settings(repo);+ settings.bind(|| {+ let mut cmd = make_snapshot_cmd(repo, "step", &[], cwd);+ cmd.arg("squash").args(args);+ for (key, value) in env_vars {+ cmd.env(key, value);+ }+ assert_cmd_snapshot!(test_name, cmd);+ });+}++/// Helper to snapshot step commit command+fn snapshot_step_commit_with_env(+ test_name: &str,+ repo: &TestRepo,+ args: &[&str],+ cwd: Option<&Path>,+ env_vars: &[(&str, &str)],+) {+ let settings = setup_snapshot_settings(repo);+ settings.bind(|| {+ let mut cmd = make_snapshot_cmd(repo, "step", &[], cwd);+ cmd.arg("commit").args(args);+ for (key, value) in env_vars {+ cmd.env(key, value);+ }+ assert_cmd_snapshot!(test_name, cmd);+ });+}++#[test]+fn test_step_squash_with_no_verify_flag() {+ let mut repo = TestRepo::new();+ repo.commit("Initial commit");+ repo.setup_remote("main");++ // Create a feature worktree with multiple commits+ let feature_wt = repo.add_worktree("feature", "feature");++ // Add a pre-commit hook so --no-verify has something to skip+ // Create in feature worktree since worktrees don't share working tree files+ fs::create_dir_all(feature_wt.join(".config")).expect("Failed to create .config");+ fs::write(+ feature_wt.join(".config/wt.toml"),+ "pre-commit-command = \"echo pre-commit check\"",+ )+ .expect("Failed to write wt.toml");++ // Commit the config as part of first commit to avoid untracked file warnings+ fs::write(feature_wt.join("file1.txt"), "content 1").expect("Failed to write file");+ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["add", ".config", "file1.txt"])+ .current_dir(&feature_wt)+ .output()+ .expect("Failed to add files");+ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["commit", "-m", "feat: add file 1"])+ .current_dir(&feature_wt)+ .output()+ .expect("Failed to commit");++ fs::write(feature_wt.join("file2.txt"), "content 2").expect("Failed to write file");+ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["add", "file2.txt"])+ .current_dir(&feature_wt)+ .output()+ .expect("Failed to add file");+ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["commit", "-m", "feat: add file 2"])+ .current_dir(&feature_wt)+ .output()+ .expect("Failed to commit");++ snapshot_step_squash_with_env(+ "step_squash_no_verify",+ &repo,+ &["--no-verify"],+ Some(&feature_wt),+ &[+ ("WORKTRUNK_COMMIT_GENERATION__COMMAND", "echo"),+ (+ "WORKTRUNK_COMMIT_GENERATION__ARGS",+ "squash: combined commits",+ ),+ ],+ );+}++#[test]+fn test_step_squash_with_stage_tracked_flag() {+ let mut repo = TestRepo::new();+ repo.commit("Initial commit");+ repo.setup_remote("main");++ let feature_wt = repo.add_worktree("feature", "feature");++ fs::write(feature_wt.join("file1.txt"), "content 1").expect("Failed to write file");+ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["add", "file1.txt"])+ .current_dir(&feature_wt)+ .output()+ .expect("Failed to add file");+ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["commit", "-m", "feat: add file 1"])+ .current_dir(&feature_wt)+ .output()+ .expect("Failed to commit");++ fs::write(feature_wt.join("file2.txt"), "content 2").expect("Failed to write file");+ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["add", "file2.txt"])+ .current_dir(&feature_wt)+ .output()+ .expect("Failed to add file");+ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["commit", "-m", "feat: add file 2"])+ .current_dir(&feature_wt)+ .output()+ .expect("Failed to commit");++ // Add uncommitted tracked changes+ fs::write(feature_wt.join("file1.txt"), "updated content").expect("Failed to write file");++ snapshot_step_squash_with_env(+ "step_squash_stage_tracked",+ &repo,+ &["--stage=tracked"],+ Some(&feature_wt),+ &[+ ("WORKTRUNK_COMMIT_GENERATION__COMMAND", "echo"),+ (+ "WORKTRUNK_COMMIT_GENERATION__ARGS",+ "squash: combined commits",+ ),+ ],+ );+}++#[test]+fn test_step_squash_with_both_flags() {+ let mut repo = TestRepo::new();+ repo.commit("Initial commit");+ repo.setup_remote("main");++ let feature_wt = repo.add_worktree("feature", "feature");++ // Add a pre-commit hook so --no-verify has something to skip+ // Create in feature worktree since worktrees don't share working tree files+ fs::create_dir_all(feature_wt.join(".config")).expect("Failed to create .config");+ fs::write(+ feature_wt.join(".config/wt.toml"),+ "pre-commit-command = \"echo pre-commit check\"",+ )+ .expect("Failed to write wt.toml");++ // Commit the config as part of first commit to avoid untracked file warnings+ fs::write(feature_wt.join("file1.txt"), "content 1").expect("Failed to write file");+ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["add", ".config", "file1.txt"])+ .current_dir(&feature_wt)+ .output()+ .expect("Failed to add files");+ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["commit", "-m", "feat: add file 1"])+ .current_dir(&feature_wt)+ .output()+ .expect("Failed to commit");++ fs::write(feature_wt.join("file2.txt"), "content 2").expect("Failed to write file");+ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["add", "file2.txt"])+ .current_dir(&feature_wt)+ .output()+ .expect("Failed to add file");+ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["commit", "-m", "feat: add file 2"])+ .current_dir(&feature_wt)+ .output()+ .expect("Failed to commit");++ fs::write(feature_wt.join("file1.txt"), "updated content").expect("Failed to write file");++ snapshot_step_squash_with_env(+ "step_squash_both_flags",+ &repo,+ &["--no-verify", "--stage=tracked"],+ Some(&feature_wt),+ &[+ ("WORKTRUNK_COMMIT_GENERATION__COMMAND", "echo"),+ (+ "WORKTRUNK_COMMIT_GENERATION__ARGS",+ "squash: combined commits",+ ),+ ],+ );+}++#[test]+fn test_step_commit_with_no_verify_flag() {+ let repo = TestRepo::new();+ repo.commit("Initial commit");++ // Add a pre-commit hook so --no-verify has something to skip+ fs::create_dir_all(repo.root_path().join(".config")).expect("Failed to create .config");+ fs::write(+ repo.root_path().join(".config/wt.toml"),+ "pre-commit-command = \"echo pre-commit check\"",+ )+ .expect("Failed to write wt.toml");++ fs::write(repo.root_path().join("file1.txt"), "content 1").expect("Failed to write file");++ snapshot_step_commit_with_env(+ "step_commit_no_verify",+ &repo,+ &["--no-verify"],+ None,+ &[+ ("WORKTRUNK_COMMIT_GENERATION__COMMAND", "echo"),+ ("WORKTRUNK_COMMIT_GENERATION__ARGS", "feat: add file"),+ ],+ );+}++#[test]+fn test_step_commit_with_stage_tracked_flag() {+ let repo = TestRepo::new();+ repo.commit("Initial commit");++ fs::write(repo.root_path().join("tracked.txt"), "initial").expect("Failed to write file");+ repo.commit("add tracked file");++ fs::write(repo.root_path().join("tracked.txt"), "modified").expect("Failed to write file");+ fs::write(+ repo.root_path().join("untracked.txt"),+ "should not be staged",+ )+ .expect("Failed to write file");++ snapshot_step_commit_with_env(+ "step_commit_stage_tracked",+ &repo,+ &["--stage=tracked"],+ None,+ &[+ ("WORKTRUNK_COMMIT_GENERATION__COMMAND", "echo"),+ (+ "WORKTRUNK_COMMIT_GENERATION__ARGS",+ "fix: update tracked file",+ ),+ ],+ );+}++#[test]+fn test_step_commit_with_both_flags() {+ let repo = TestRepo::new();+ repo.commit("Initial commit");++ // Add a pre-commit hook so --no-verify has something to skip+ fs::create_dir_all(repo.root_path().join(".config")).expect("Failed to create .config");+ fs::write(+ repo.root_path().join(".config/wt.toml"),+ "pre-commit-command = \"echo pre-commit check\"",+ )+ .expect("Failed to write wt.toml");++ fs::write(repo.root_path().join("tracked.txt"), "initial").expect("Failed to write file");+ repo.commit("add tracked file");++ fs::write(repo.root_path().join("tracked.txt"), "modified").expect("Failed to write file");++ snapshot_step_commit_with_env(+ "step_commit_both_flags",+ &repo,+ &["--no-verify", "--stage=tracked"],+ None,+ &[+ ("WORKTRUNK_COMMIT_GENERATION__COMMAND", "echo"),+ ("WORKTRUNK_COMMIT_GENERATION__ARGS", "fix: update file"),+ ],+ );+}diff --git a/tests/output_system_guard.rs b/tests/output_system_guard.rsindex 9118d2003..f654181ab 100644--- a/tests/output_system_guard.rs+++ b/tests/output_system_guard.rs@@ -9,6 +9,7 @@ fn check_output_system_usage() {"src/commands/merge.rs","src/commands/list/mod.rs","src/commands/list/collect.rs",+ "src/commands/list/collect_progressive_impl.rs",];let forbidden_tokens = ["print!", "println!", "eprint!", "eprintln!"];let allowed_substrings = ["spacing_test.rs", "command_approval.rs"];@@ -24,6 +25,10 @@ fn check_output_system_usage() {let contents = fs::read_to_string(&full_path).unwrap_or_else(|err| panic!("failed to read {}: {err}", relative_path));+ // Check if file imports the correct anstream-wrapped macros from worktrunk::styling+ let has_styling_import = contents.contains("use worktrunk::styling::")+ && (contents.contains("eprintln") || contents.contains("println"));+'line: for (idx, line) in contents.lines().enumerate() {for token in forbidden_tokens {if let Some(pos) = line.find(token) {@@ -42,6 +47,11 @@ fn check_output_system_usage() {continue 'line;}+ // Allow if file imports the correct macro from worktrunk::styling+ if has_styling_import && (token == "eprintln!" || token == "println!") {+ continue 'line;+ }+violations.push(format!("{}:{}: {}", relative_path, idx + 1, line.trim()));continue 'line;}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 cfb6d1287..c52edca1b 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@@ -23,7 +23,7 @@ exit_code: 0----- stdout -----π‘ [33mAuto-staging 1 untracked file:[0m[107m [0m dirty.txt-π [36mCommitting with default message...[0m (1 file, [32m+1[0m, no squashing needed)+π [36mCommitting changes with default message...[0m (1 file, [32m+1[0m, no squashing needed)π‘ [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m[107m [0m [1mChanges to dirty.txt[0mβ [32mCommitted changes @ [2m[SHA][0mdiff --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 b4dd66a95..fb6bfbb70 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@@ -23,7 +23,7 @@ exit_code: 0----- stdout -----π‘ [33mAuto-staging 1 untracked file:[0m[107m [0m newfile.txt-π [36mCommitting with default message...[0m (1 file, [32m+1[0m, no squashing needed)+π [36mCommitting changes with default message...[0m (1 file, [32m+1[0m, no squashing needed)π‘ [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m[107m [0m [1mChanges to newfile.txt[0mβ [32mCommitted changes @ [2m[SHA][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 4202b5345..e3ed9c302 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@@ -26,7 +26,7 @@ exit_code: 0[107m [0m feature.txtπ [36mRunning pre-commit:[0m[107m [0m [1m[2m[34mecho[0m [2m[32m'Pre-commit check passed'[0m[0m-π [36mCommitting with default message...[0m (1 file, [32m+1[0m, no squashing needed)+π [36mCommitting changes with default message...[0m (1 file, [32m+1[0m, no squashing needed)π‘ [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m[107m [0m [1mChanges to feature.txt[0mβ [32mCommitted changes @ [2m[SHA][0mdiff --git a/tests/snapshots/integration__integration_tests__merge__step_commit_both_flags.snap b/tests/snapshots/integration__integration_tests__merge__step_commit_both_flags.snapnew file mode 100644index 000000000..3c200a9d9--- /dev/null+++ b/tests/snapshots/integration__integration_tests__merge__step_commit_both_flags.snap@@ -0,0 +1,34 @@+---+source: tests/integration_tests/merge.rs+info:+ program: wt+ args:+ - step+ - commit+ - "--no-verify"+ - "--stage=tracked"+ env:+ CLICOLOR_FORCE: "1"+ COLUMNS: "150"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1761609600"+ WORKTRUNK_COMMIT_GENERATION__ARGS: "fix: update file"+ WORKTRUNK_COMMIT_GENERATION__COMMAND: echo+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+---+success: true+exit_code: 0+----- stdout -----+π‘ [2mSkipping pre-commit hook (--no-verify)[0m+π [36mCommitting tracked changes with default message...[0m (1 file, [32m+1[0m, [31m-1[0m)+π‘ [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m+[107m [0m [1mChanges to tracked.txt[0m+β [32mCommitted changes @ [2m[SHA][0m++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__step_commit_no_verify.snap b/tests/snapshots/integration__integration_tests__merge__step_commit_no_verify.snapnew file mode 100644index 000000000..7915be617--- /dev/null+++ b/tests/snapshots/integration__integration_tests__merge__step_commit_no_verify.snap@@ -0,0 +1,36 @@+---+source: tests/integration_tests/merge.rs+info:+ program: wt+ args:+ - step+ - commit+ - "--no-verify"+ env:+ CLICOLOR_FORCE: "1"+ COLUMNS: "150"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1761609600"+ WORKTRUNK_COMMIT_GENERATION__ARGS: "feat: add file"+ WORKTRUNK_COMMIT_GENERATION__COMMAND: echo+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+---+success: true+exit_code: 0+----- stdout -----+π‘ [2mSkipping pre-commit hook (--no-verify)[0m+π‘ [33mAuto-staging 2 untracked files:[0m+[107m [0m .config/+[107m [0m file1.txt+π [36mCommitting changes with default message...[0m (2 files, [32m+2[0m)+π‘ [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m+[107m [0m [1mChanges to wt.toml & file1.txt[0m+β [32mCommitted changes @ [2m[SHA][0m++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__step_commit_stage_tracked.snap b/tests/snapshots/integration__integration_tests__merge__step_commit_stage_tracked.snapnew file mode 100644index 000000000..1c127e17d--- /dev/null+++ b/tests/snapshots/integration__integration_tests__merge__step_commit_stage_tracked.snap@@ -0,0 +1,32 @@+---+source: tests/integration_tests/merge.rs+info:+ program: wt+ args:+ - step+ - commit+ - "--stage=tracked"+ env:+ CLICOLOR_FORCE: "1"+ COLUMNS: "150"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1761609600"+ WORKTRUNK_COMMIT_GENERATION__ARGS: "fix: update tracked file"+ WORKTRUNK_COMMIT_GENERATION__COMMAND: echo+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+---+success: true+exit_code: 0+----- stdout -----+π [36mCommitting tracked changes with default message...[0m (1 file, [32m+1[0m, [31m-1[0m)+π‘ [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m+[107m [0m [1mChanges to tracked.txt[0m+β [32mCommitted changes @ [2m[SHA][0m++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__step_squash_both_flags.snap b/tests/snapshots/integration__integration_tests__merge__step_squash_both_flags.snapnew file mode 100644index 000000000..7b308a940--- /dev/null+++ b/tests/snapshots/integration__integration_tests__merge__step_squash_both_flags.snap@@ -0,0 +1,40 @@+---+source: tests/integration_tests/merge.rs+info:+ program: wt+ args:+ - step+ - squash+ - "--no-verify"+ - "--stage=tracked"+ env:+ CLICOLOR_FORCE: "1"+ COLUMNS: "150"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1761609600"+ WORKTRUNK_COMMIT_GENERATION__ARGS: "squash: combined commits"+ WORKTRUNK_COMMIT_GENERATION__COMMAND: echo+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+---+success: true+exit_code: 0+----- stdout -----+π‘ [2mSkipping pre-commit hook (--no-verify)[0m+π [36mSquashing 2 commits & tracked changes into a single commit[0m (3 files, [32m+3[0m)...+π‘ [2mBackup created @ [SHA][0m+π [36mGenerating squash commit message...[0m+π‘ [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m+[107m [0m [1mSquash commits from main[0m+[107m [0m+[107m [0m Combined commits:+[107m [0m - feat: add file 1+[107m [0m - feat: add file 2+β [32mSquashed @ [2m[SHA][0m++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__step_squash_no_verify.snap b/tests/snapshots/integration__integration_tests__merge__step_squash_no_verify.snapnew file mode 100644index 000000000..87b9d2416--- /dev/null+++ b/tests/snapshots/integration__integration_tests__merge__step_squash_no_verify.snap@@ -0,0 +1,38 @@+---+source: tests/integration_tests/merge.rs+info:+ program: wt+ args:+ - step+ - squash+ - "--no-verify"+ env:+ CLICOLOR_FORCE: "1"+ COLUMNS: "150"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1761609600"+ WORKTRUNK_COMMIT_GENERATION__ARGS: "squash: combined commits"+ WORKTRUNK_COMMIT_GENERATION__COMMAND: echo+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+---+success: true+exit_code: 0+----- stdout -----+π‘ [2mSkipping pre-commit hook (--no-verify)[0m+π [36mSquashing 2 commits into a single commit[0m (3 files, [32m+3[0m)...+π [36mGenerating squash commit message...[0m+π‘ [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m+[107m [0m [1mSquash commits from main[0m+[107m [0m+[107m [0m Combined commits:+[107m [0m - feat: add file 1+[107m [0m - feat: add file 2+β [32mSquashed @ [2m[SHA][0m++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__step_squash_stage_tracked.snap b/tests/snapshots/integration__integration_tests__merge__step_squash_stage_tracked.snapnew file mode 100644index 000000000..4d62f4ed9--- /dev/null+++ b/tests/snapshots/integration__integration_tests__merge__step_squash_stage_tracked.snap@@ -0,0 +1,38 @@+---+source: tests/integration_tests/merge.rs+info:+ program: wt+ args:+ - step+ - squash+ - "--stage=tracked"+ env:+ CLICOLOR_FORCE: "1"+ COLUMNS: "150"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1761609600"+ WORKTRUNK_COMMIT_GENERATION__ARGS: "squash: combined commits"+ WORKTRUNK_COMMIT_GENERATION__COMMAND: echo+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+---+success: true+exit_code: 0+----- stdout -----+π [36mSquashing 2 commits & tracked changes into a single commit[0m (2 files, [32m+2[0m)...+π‘ [2mBackup created @ [SHA][0m+π [36mGenerating squash commit message...[0m+π‘ [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m+[107m [0m [1mSquash commits from main[0m+[107m [0m+[107m [0m Combined commits:+[107m [0m - feat: add file 1+[107m [0m - feat: add file 2+β [32mSquashed @ [2m[SHA][0m++----- stderr -----