Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat(pre-commit): Run pre-commit during squash and update init snapshots
Maximilian Roos9035d44736d7
diff --git a/.config/wt.example.toml b/.config/wt.example.tomlindex 3b7cabc04..7264e3d22 100644--- a/.config/wt.example.toml+++ b/.config/wt.example.toml@@ -51,8 +51,9 @@# watch = "npm run watch"# Pre-Commit Commands-# Runs SEQUENTIALLY before committing changes (blocking, fail-fast)+# Runs SEQUENTIALLY before committing changes during merge (blocking, fail-fast)# All commands must exit with code 0 for commit to proceed+# Runs for both squash and no-squash merge modes# Use for: formatters, linters, quick validation## Format options same as post-create-command@@ -63,14 +64,6 @@# format = "cargo fmt -- --check"# lint = "cargo clippy -- -D warnings"-# Pre-Squash Commands-# Runs SEQUENTIALLY before squashing commits (blocking, fail-fast)-# All commands must exit with code 0 for squash to proceed-# Use for: validation before combining commits-#-# Format options same as post-create-command-# pre-squash-command = "cargo test"-# Pre-Merge Commands# Runs SEQUENTIALLY before merging to target branch (blocking, fail-fast)# All commands must exit with code 0 for merge to proceeddiff --git a/.config/wt.toml b/.config/wt.tomlindex 092728373..c927dc353 100644--- a/.config/wt.toml+++ b/.config/wt.toml@@ -23,7 +23,7 @@ cp -cR {repo_root}/target/. {worktree}/target/post-merge-command = "cargo install --path ."# Pre-commit commands-# These run sequentially before committing changes+# These run sequentially before committing changes during merge (both squash and no-squash)# All commands must exit with code 0 for commit to proceed[pre-commit-command]pre-commit = "pre-commit run --all-files"diff --git a/README.md b/README.mdindex e3e4bb7ae..d05f5bac5 100644--- a/README.md+++ b/README.md@@ -269,8 +269,7 @@ Automate common tasks by creating `.config/wt.toml` in your repository root. Run|------|--------------|-----------|------------------|| **post-create-command** | After `git worktree add` completes | Sequential, blocking | Logs warning, continues with remaining commands || **post-start-command** | After post-create completes | Parallel, non-blocking (background processes) | Logs warning, doesn't affect switch result |-| **pre-commit-command** | Before committing changes during `wt merge --no-squash` | Sequential, blocking, fail-fast | Terminates merge immediately |-| **pre-squash-command** | Before squashing commits during `wt merge` (default behavior) | Sequential, blocking, fail-fast | Terminates merge immediately |+| **pre-commit-command** | Before committing changes during `wt merge` (both squash and no-squash modes) | Sequential, blocking, fail-fast | Terminates merge immediately || **pre-merge-command** | After rebase completes during `wt merge` (validates rebased state before push) | Sequential, blocking, fail-fast | Terminates merge immediately || **post-merge-command** | After successful merge and push to target branch, before cleanup | Sequential, blocking | Logs warning, continues with remaining commands |diff --git a/src/commands/completion.rs b/src/commands/completion.rsindex c1ace08c0..05fe86629 100644--- a/src/commands/completion.rs+++ b/src/commands/completion.rs@@ -154,7 +154,6 @@ pub fn handle_complete(args: Vec<String>) -> Result<(), GitError> {println!("post-create");println!("post-start");println!("pre-commit");- println!("pre-squash");println!("pre-merge");println!("post-merge");}diff --git a/src/commands/dev.rs b/src/commands/dev.rsindex e0b0d6024..de8cbbe24 100644--- a/src/commands/dev.rs+++ b/src/commands/dev.rs@@ -7,8 +7,7 @@ use worktrunk::styling::{use super::merge::{commit_with_generated_message, execute_post_merge_commands, format_commit_message_for_display,- run_pre_commit_commands, run_pre_merge_commands, run_pre_squash_commands,- show_llm_config_hint_if_needed,+ run_pre_commit_commands, run_pre_merge_commands, show_llm_config_hint_if_needed,};use super::worktree::{execute_post_create_commands, execute_post_start_commands_sequential, parse_diff_shortstat,@@ -44,6 +43,8 @@ pub fn handle_dev_run_hook(hook_type: HookType, force: bool) -> Result<(), GitEr}HookType::PreCommit => {check_hook_configured(&project_config.pre_commit_command, hook_type)?;+ // Pre-commit hook can optionally use target branch context+ let target_branch = repo.default_branch().ok();run_pre_commit_commands(&project_config,&branch,@@ -51,19 +52,7 @@ pub fn handle_dev_run_hook(hook_type: HookType, force: bool) -> Result<(), GitEr&repo,&config,force,- )- }- HookType::PreSquash => {- check_hook_configured(&project_config.pre_squash_command, hook_type)?;- let target_branch = repo.default_branch().unwrap_or_else(|_| "main".to_string());- run_pre_squash_commands(- &project_config,- &branch,- &target_branch,- &worktree_path,- &repo,- &config,- force,+ target_branch.as_deref(),)}HookType::PreMerge => {@@ -141,6 +130,7 @@ pub fn handle_dev_commit(force: bool, no_verify: bool) -> Result<(), GitError> {if !no_verify && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {let worktree_path =std::env::current_dir().git_context("Failed to get current directory")?;+ // No target branch context for standalone commitsrun_pre_commit_commands(&project_config,¤t_branch,@@ -148,6 +138,7 @@ pub fn handle_dev_commit(force: bool, no_verify: bool) -> Result<(), GitError> {&repo,&config,force,+ None,)?;}@@ -173,18 +164,18 @@ pub fn handle_dev_squash(// Get target branch (default to default branch if not provided)let target_branch = repo.resolve_target_branch(target)?;- // Run pre-squash hook unless --no-verify was specified+ // Run pre-commit hook unless --no-verify was specifiedif !no_verify && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {let worktree_path =std::env::current_dir().git_context("Failed to get current directory")?;- run_pre_squash_commands(+ run_pre_commit_commands(&project_config,¤t_branch,- &target_branch,&worktree_path,&repo,&config,force,+ Some(&target_branch),)?;}diff --git a/src/commands/merge.rs b/src/commands/merge.rsindex 4c4f59c96..0e11a7a47 100644--- a/src/commands/merge.rs+++ b/src/commands/merge.rs@@ -95,6 +95,7 @@ pub fn handle_merge(handle_commit_changes(&config.commit_generation,¤t_branch,+ Some(&target_branch),no_verify,force,tracked_only,@@ -310,6 +311,7 @@ pub fn commit_with_generated_message(fn handle_commit_changes(commit_generation_config: &worktrunk::config::CommitGenerationConfig,current_branch: &str,+ target_branch: Option<&str>,no_verify: bool,force: bool,tracked_only: bool,@@ -328,6 +330,7 @@ fn handle_commit_changes(&repo,&config,force,+ target_branch,)?;}@@ -492,6 +495,7 @@ pub fn run_pre_commit_commands(repo: &Repository,config: &WorktrunkConfig,force: bool,+ target_branch: Option<&str>,) -> Result<(), GitError> {let Some(pre_commit_config) = &project_config.pre_commit_command else {return Ok(());@@ -506,11 +510,19 @@ pub fn run_pre_commit_commands(&repo_root,force,);++ // Build extra variables - include target if provided+ let extra_vars: Vec<(&str, &str)> = if let Some(target) = target_branch {+ vec![("target", target)]+ } else {+ vec![]+ };+let commands = prepare_project_commands(pre_commit_config,&ctx,false,- &[],+ &extra_vars,"Pre-commit commands",|_name, command| {let dim = AnstyleStyle::new().dimmed();@@ -541,62 +553,3 @@ pub fn run_pre_commit_commands(Ok(())}--/// Run pre-squash commands sequentially (blocking, fail-fast)-pub fn run_pre_squash_commands(- project_config: &ProjectConfig,- current_branch: &str,- target_branch: &str,- worktree_path: &std::path::Path,- repo: &Repository,- config: &WorktrunkConfig,- force: bool,-) -> Result<(), GitError> {- let Some(pre_squash_config) = &project_config.pre_squash_command else {- return Ok(());- };-- let repo_root = repo.main_worktree_root()?;- let ctx = CommandContext::new(- repo,- config,- current_branch,- worktree_path,- &repo_root,- force,- );- let commands = prepare_project_commands(- pre_squash_config,- &ctx,- false,- &[("target", target_branch)],- "Pre-squash commands",- |_name, command| {- let dim = AnstyleStyle::new().dimmed();- crate::output::progress(format!("{dim}Skipping command: {command}{dim:#}")).ok();- },- )?;-- if commands.is_empty() {- return Ok(());- }-- // Execute each command sequentially- for prepared in commands {- let label = crate::commands::format_command_label("pre-squash", prepared.name.as_deref());- crate::output::progress(format!("π {CYAN}{label}{CYAN:#}"))?;- crate::output::progress(format_bash_with_gutter(&prepared.expanded, ""))?;-- if let Err(e) = execute_command_in_worktree(worktree_path, &prepared.expanded) {- return Err(GitError::HookCommandFailed {- hook_type: HookType::PreSquash,- command_name: prepared.name.clone(),- error: e.to_string(),- });- }- }-- crate::output::flush()?;-- Ok(())-}diff --git a/src/config.rs b/src/config.rsindex 55010fba1..0455ae1b8 100644--- a/src/config.rs+++ b/src/config.rs@@ -20,9 +20,8 @@//! **Settings**://! - `post-create-command` - Sequential blocking commands when creating worktree//! - `post-start-command` - Parallel background commands after worktree created-//! - `pre-commit-command` - Validation before committing-//! - `pre-squash-command` - Validation before squashing commits-//! - `pre-merge-command` - Validation before merging+//! - `pre-commit-command` - Validation before committing changes during merge+//! - `pre-merge-command` - Validation before merging to target branch//! - `post-merge-command` - Cleanup after successful merge//!//! **Managed by**: Checked into the repository, shared across all developers@@ -138,7 +137,7 @@ pub struct CommitGenerationConfig {/// - `{worktree}` - Absolute path to the worktree/// - `{repo_root}` - Absolute path to the repository root///-/// Merge-related commands (`pre-squash-command`, `pre-merge-command`, `post-merge-command`) also support:+/// Merge-related commands (`pre-commit-command`, `pre-merge-command`, `post-merge-command`) also support:/// - `{target}` - Target branch for the merge (e.g., "main")#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq)]pub struct ProjectConfig {@@ -156,22 +155,15 @@ pub struct ProjectConfig {#[serde(default, rename = "post-start-command")]pub post_start_command: Option<CommandConfig>,- /// Commands to execute before committing changes (blocking, fail-fast validation)+ /// Commands to execute before committing changes during merge (blocking, fail-fast validation)/// Supports string (single command), array (sequential), or table (named, sequential)/// All commands must exit with code 0 for commit to proceed+ /// Runs before any commit operation during `wt merge` (both squash and no-squash modes)///- /// Available template variables: `{repo}`, `{branch}`, `{worktree}`, `{repo_root}`+ /// Available template variables: `{repo}`, `{branch}`, `{worktree}`, `{repo_root}`, `{target}`#[serde(default, rename = "pre-commit-command")]pub pre_commit_command: Option<CommandConfig>,- /// Commands to execute before squashing commits (blocking, fail-fast validation)- /// Supports string (single command), array (sequential), or table (named, sequential)- /// All commands must exit with code 0 for squash to proceed- ///- /// Available template variables: `{repo}`, `{branch}`, `{worktree}`, `{repo_root}`, `{target}`- #[serde(default, rename = "pre-squash-command")]- pub pre_squash_command: Option<CommandConfig>,-/// Commands to execute before merging (blocking, fail-fast validation)/// Supports string (single command), array (sequential), or table (named, sequential)/// All commands must exit with code 0 for merge to proceeddiff --git a/src/git.rs b/src/git.rsindex b3c739ec2..a055cde69 100644--- a/src/git.rs+++ b/src/git.rs@@ -7,7 +7,6 @@ pub enum HookType {PostCreate,PostStart,PreCommit,- PreSquash,PreMerge,PostMerge,}diff --git a/src/main.rs b/src/main.rsindex 6ca924b9f..15dbf37dd 100644--- a/src/main.rs+++ b/src/main.rs@@ -99,7 +99,7 @@ enum DevCommand {#[arg(short, long)]force: bool,- /// Skip all project hooks (pre-squash-command)+ /// Skip all project hooks (pre-commit-command, pre-merge-command)#[arg(long)]no_verify: bool,},diff --git a/tests/integration_tests/completion.rs b/tests/integration_tests/completion.rsindex 392e512ed..3d405a095 100644--- a/tests/integration_tests/completion.rs+++ b/tests/integration_tests/completion.rs@@ -706,10 +706,9 @@ fn test_complete_dev_run_hook_shows_hook_types() {assert!(hooks.contains(&"post-create"), "Missing post-create");assert!(hooks.contains(&"post-start"), "Missing post-start");assert!(hooks.contains(&"pre-commit"), "Missing pre-commit");- assert!(hooks.contains(&"pre-squash"), "Missing pre-squash");assert!(hooks.contains(&"pre-merge"), "Missing pre-merge");assert!(hooks.contains(&"post-merge"), "Missing post-merge");- assert_eq!(hooks.len(), 6, "Should have exactly 6 hook types");+ assert_eq!(hooks.len(), 5, "Should have exactly 5 hook types");}#[test]diff --git a/tests/integration_tests/merge.rs b/tests/integration_tests/merge.rsindex 98de84668..480a666cf 100644--- a/tests/integration_tests/merge.rs+++ b/tests/integration_tests/merge.rs@@ -1550,12 +1550,12 @@ fn test_merge_pre_squash_command_success() {repo.commit("Initial commit");repo.setup_remote("main");- // Create project config with pre-squash command+ // Create project config with pre-commit command (used for both squash and no-squash)let config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).expect("Failed to create config dir");fs::write(config_dir.join("wt.toml"),- r#"pre-squash-command = "echo 'Pre-squash check passed'""#,+ "pre-commit-command = \"echo 'Pre-commit check passed'\"",).expect("Failed to write config");@@ -1603,12 +1603,12 @@ fn test_merge_pre_squash_command_failure() {repo.commit("Initial commit");repo.setup_remote("main");- // Create project config with failing pre-squash command+ // Create project config with failing pre-commit command (used for both squash and no-squash)let config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).expect("Failed to create config dir");fs::write(config_dir.join("wt.toml"),- r#"pre-squash-command = "exit 1""#,+ r#"pre-commit-command = "exit 1""#,).expect("Failed to write config");@@ -1641,7 +1641,7 @@ fn test_merge_pre_squash_command_failure() {.output().expect("Failed to commit");- // Merge with --force (squashing is default) - pre-squash command should fail and block merge+ // Merge with --force (squashing is default) - pre-commit command should fail and block mergesnapshot_merge("merge_pre_squash_command_failure",&repo,diff --git a/tests/snapshots/integration__integration_tests__init__init_bash.snap b/tests/snapshots/integration__integration_tests__init__init_bash.snapindex 212b0e853..a9d77cb62 100644--- a/tests/snapshots/integration__integration_tests__init__init_bash.snap+++ b/tests/snapshots/integration__integration_tests__init__init_bash.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpo3IbDR/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpMWhULf/test-config.toml---success: trueexit_code: 0@@ -407,7 +407,7 @@ _wt() {return 0;;wt__dev__run__hook)- opts="-f -v -h --force --verbose --help post-create post-start pre-commit pre-squash pre-merge post-merge"+ opts="-f -v -h --force --verbose --help post-create post-start pre-commit pre-merge post-merge"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0diff --git a/tests/snapshots/integration__integration_tests__init__init_fish.snap b/tests/snapshots/integration__integration_tests__init__init_fish.snapindex 09415e413..9feed40b8 100644--- a/tests/snapshots/integration__integration_tests__init__init_fish.snap+++ b/tests/snapshots/integration__integration_tests__init__init_fish.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpLhXsKg/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpRI5DMl/test-config.toml---success: trueexit_code: 0@@ -259,7 +259,7 @@ complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_frcomplete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from commit" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from commit" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from squash" -s f -l force -d 'Skip command approval prompts'-complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from squash" -l no-verify -d 'Skip all project hooks (pre-squash-command)'+complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from squash" -l no-verify -d 'Skip all project hooks (pre-commit-command, pre-merge-command)'complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from squash" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from squash" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from push" -l allow-merge-commits -d 'Allow pushing merge commits (non-linear history)'diff --git a/tests/snapshots/integration__integration_tests__init__init_zsh.snap b/tests/snapshots/integration__integration_tests__init__init_zsh.snapindex 2aca78e64..0b3264fe7 100644--- a/tests/snapshots/integration__integration_tests__init__init_zsh.snap+++ b/tests/snapshots/integration__integration_tests__init__init_zsh.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpYlKodK/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpC5169N/test-config.toml---success: trueexit_code: 0@@ -248,7 +248,7 @@ _arguments "${_arguments_options[@]}" : \'--verbose[Enable verbose output (show git commands and debug info)]' \'-h[Print help]' \'--help[Print help]' \-':hook_type -- Hook type to run:(post-create post-start pre-commit pre-squash pre-merge post-merge)' \+':hook_type -- Hook type to run:(post-create post-start pre-commit pre-merge post-merge)' \&& ret=0;;(commit)@@ -266,7 +266,7 @@ _arguments "${_arguments_options[@]}" : \_arguments "${_arguments_options[@]}" : \'-f[Skip command approval prompts]' \'--force[Skip command approval prompts]' \-'--no-verify[Skip all project hooks (pre-squash-command)]' \+'--no-verify[Skip all project hooks (pre-commit-command, pre-merge-command)]' \'-v[Enable verbose output (show git commands and debug info)]' \'--verbose[Enable verbose output (show git commands and debug info)]' \'-h[Print help]' \diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snapindex 872b1ca87..92a71488a 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap@@ -17,30 +17,19 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpquh1wW/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpaE19F3/test-config.toml----success: true-exit_code: 0+success: false+exit_code: 1----- stdout -----π‘ [33mAuto-staging untracked files: feature.txt[0m-π [36mCommitting changes...[0m (1 file, [32m+1[0m)-π [36mGenerating commit message...[0m-π‘ [2mUsing fallback commit message. Run 'wt config help' to configure LLM-generated messages[0m-[40m [0m [1mWIP: Auto-commit before merge[0m+π [36mRunning pre-commit:[0m+[40m [0m [1m[34mexit[0m 1[0m-β [32mCommitted changes[0m @ [SHA]-π [36mRebasing onto [0m[1m[36mmain[0m[36m...[0m-β [32mRebased onto [1m[32mmain[0m[0m-π [36mMerging 1 commit to [1m[36mmain[0m[0m @ [SHA]-* [SHA][33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m WIP: Auto-commit before merge-- feature.txt | 1 [32m+[m- 1 file changed, 1 insertion(+)--β [32mMerged to [1m[32mmain[0m (1 commit, 1 file, [32m+1[0m) [0m-π [36mCleaning up worktree...[0m+----- stderr -----+[0mβ [31mpre-commit command failed[0m-β [32mReturned to primary at [1m[32m[REPO][0m[0m+Command failed with exit code: exit status: 1------ stderr -----+π‘ [2mUse --no-hooks to skip pre-commit commands[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 e7a3950b0..8d680b131 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,12 +17,15 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpecKl28/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp7m4hKj/test-config.toml---success: trueexit_code: 0----- stdout -----π‘ [33mAuto-staging untracked files: feature.txt[0m+π [36mRunning pre-commit:[0m+[40m [0m [1m[34mecho[0m [32m'Pre-commit check passed'[0m[0m+π [36mCommitting changes...[0m (1 file, [32m+1[0m)π [36mGenerating commit message...[0mπ‘ [2mUsing fallback commit message. Run 'wt config help' to configure LLM-generated messages[0m@@ -44,3 +47,4 @@ exit_code: 0β [32mReturned to primary at [1m[32m[REPO][0m[0m----- stderr -----+[0mPre-commit check passeddiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snapindex 09a485efd..2587f9920 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snap@@ -17,18 +17,18 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpYJX0p5/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp8bd7Rj/test-config.toml---success: falseexit_code: 1----- stdout ------π [36mRunning pre-squash:[0m+π [36mRunning pre-commit:[0m[40m [0m [1m[34mexit[0m 1[0m----- stderr ------[0mβ [31mpre-squash command failed[0m+[0mβ [31mpre-commit command failed[0mCommand failed with exit code: exit status: 1-π‘ [2mUse --no-hooks to skip pre-squash commands[0m+π‘ [2mUse --no-hooks to skip pre-commit commands[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 4a483219c..422454a6b 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,13 +17,13 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpSOWdk0/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpDxnhbC/test-config.toml---success: trueexit_code: 0----- stdout ------π [36mRunning pre-squash:[0m-[40m [0m [1m[34mecho[0m [32m'Pre-squash check passed'[0m[0m+π [36mRunning pre-commit:[0m+[40m [0m [1m[34mecho[0m [32m'Pre-commit check passed'[0m[0mπ‘ [2mOnly 1 commit since [0m[1m[36mmain[0m[2m - no squashing needed[0mπ [36mRebasing onto [0m[1m[36mmain[0m[36m...[0m@@ -41,4 +41,4 @@ exit_code: 0β [32mReturned to primary at [1m[32m[REPO][0m[0m----- stderr ------[0mPre-squash check passed+[0mPre-commit check passed