Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
refactor: Align hook skip flag with Git `--no-verify`
Maximilian Roosaf46db9fac4e
diff --git a/README.md b/README.mdindex 9c736cda8..0347a44fa 100644--- a/README.md+++ b/README.md@@ -271,7 +271,7 @@ Automate common tasks by creating `.config/wt.toml` in your repository root. Run**Template variables:** `{repo}`, `{branch}`, `{worktree}`, `{repo_root}`, `{target}`-**Skipping hooks:** `wt switch --no-hooks` or `wt merge --no-hooks`+**Skipping hooks:** `wt switch --no-verify` or `wt merge --no-verify`**Security:** Commands require approval on first run. Use `--force` to bypass.diff --git a/src/commands/dev.rs b/src/commands/dev.rsindex f60cc1036..e0b0d6024 100644--- a/src/commands/dev.rs+++ b/src/commands/dev.rs@@ -130,15 +130,15 @@ fn check_hook_configured<T>(hook: &Option<T>, hook_type: HookType) -> Result<(),}/// Handle `wt dev commit` command-pub fn handle_dev_commit(force: bool, no_hooks: bool) -> Result<(), GitError> {+pub fn handle_dev_commit(force: bool, no_verify: bool) -> Result<(), GitError> {let repo = Repository::current();let config = WorktrunkConfig::load().git_context("Failed to load config")?;let current_branch = repo.current_branch()?.ok_or_else(|| GitError::CommandFailed("Not on a branch (detached HEAD)".to_string()))?;- // Run pre-commit hook unless --no-hooks was specified- if !no_hooks && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {+ // Run pre-commit hook unless --no-verify was specified+ 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")?;run_pre_commit_commands(@@ -162,7 +162,7 @@ pub fn handle_dev_commit(force: bool, no_hooks: bool) -> Result<(), GitError> {pub fn handle_dev_squash(target: Option<&str>,force: bool,- no_hooks: bool,+ no_verify: bool,) -> Result<(), GitError> {let repo = Repository::current();let config = WorktrunkConfig::load().git_context("Failed to load config")?;@@ -173,8 +173,8 @@ 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-hooks was specified- if !no_hooks && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {+ // Run pre-squash hook unless --no-verify was specified+ 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")?;run_pre_squash_commands(diff --git a/src/commands/merge.rs b/src/commands/merge.rsindex e5f4243de..46a938d19 100644--- a/src/commands/merge.rs+++ b/src/commands/merge.rs@@ -50,7 +50,7 @@ pub fn handle_merge(target: Option<&str>,squash_enabled: bool,keep: bool,- no_hooks: bool,+ no_verify: bool,force: bool,tracked_only: bool,) -> Result<(), GitError> {@@ -95,7 +95,7 @@ pub fn handle_merge(handle_commit_changes(&config.commit_generation,¤t_branch,- no_hooks,+ no_verify,force,tracked_only,)?;@@ -104,15 +104,15 @@ pub fn handle_merge(// Squash commits if enabledif squash_enabled {- handle_squash(&target_branch, no_hooks, force)?;+ handle_squash(&target_branch, no_verify, force)?;}// Rebase onto target (delegate to atomic dev command)super::dev::handle_dev_rebase(Some(&target_branch))?;- // Run pre-merge checks unless --no-hooks was specified+ // Run pre-merge checks unless --no-verify was specified// Do this AFTER rebase to validate the final state that will be pushed- if !no_hooks && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {+ 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")?;run_pre_merge_commands(@@ -310,15 +310,15 @@ pub fn commit_with_generated_message(fn handle_commit_changes(commit_generation_config: &worktrunk::config::CommitGenerationConfig,current_branch: &str,- no_hooks: bool,+ no_verify: bool,force: bool,tracked_only: bool,) -> Result<(), GitError> {let repo = Repository::current();let config = WorktrunkConfig::load().git_context("Failed to load config")?;- // Run pre-commit hook unless --no-hooks was specified- if !no_hooks && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {+ // Run pre-commit hook unless --no-verify was specified+ 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")?;run_pre_commit_commands(@@ -350,11 +350,11 @@ fn handle_commit_changes(fn handle_squash(target_branch: &str,- no_hooks: bool,+ no_verify: bool,force: bool,) -> Result<Option<usize>, GitError> {// Delegate to the atomic dev command- super::dev::handle_dev_squash(Some(target_branch), force, no_hooks)?;+ super::dev::handle_dev_squash(Some(target_branch), force, no_verify)?;Ok(None)}diff --git a/src/commands/worktree.rs b/src/commands/worktree.rsindex 3d12245b0..bbbdddc05 100644--- a/src/commands/worktree.rs+++ b/src/commands/worktree.rs@@ -149,7 +149,7 @@ pub fn handle_switch(create: bool,base: Option<&str>,force: bool,- no_hooks: bool,+ no_verify: bool,config: &WorktrunkConfig,) -> Result<SwitchResult, GitError> {let repo = Repository::current();@@ -216,7 +216,7 @@ pub fn handle_switch(.git_context("Failed to canonicalize worktree path")?;// Execute post-create commands (sequential, blocking)- if !no_hooks {+ if !no_verify {execute_post_create_commands(&worktree_path, &repo, config, branch, force)?;}diff --git a/src/main.rs b/src/main.rsindex 67035dbb4..78d8c0029 100644--- a/src/main.rs+++ b/src/main.rs@@ -87,7 +87,7 @@ enum DevCommand {/// Skip all project hooks (pre-commit-command)#[arg(long)]- no_hooks: bool,+ no_verify: bool,},/// Squash commits with LLM-generated message@@ -101,7 +101,7 @@ enum DevCommand {/// Skip all project hooks (pre-squash-command)#[arg(long)]- no_hooks: bool,+ no_verify: bool,},/// Push changes to target branch@@ -195,7 +195,7 @@ enum Commands {/// Skip all project hooks (post-create, post-start)#[arg(long)]- no_hooks: bool,+ no_verify: bool,},/// Finish current worktree, returning to primary if current@@ -241,7 +241,7 @@ The merge operation follows a strict order designed for fail-fast execution:5. Run pre-merge commandsRuns commands from project config's [pre-merge-command] after rebase completes.These receive {target} placeholder for the target branch. Commands run sequentially- and any failure aborts the merge immediately. Skip with --no-hooks.+ and any failure aborts the merge immediately. Skip with --no-verify.6. Push to targetFast-forward pushes to target branch. Rejects non-fast-forward pushes (ensures@@ -263,7 +263,7 @@ Keep worktree after merging:wt merge --keepSkip pre-merge commands:- wt merge --no-hooks")]+ wt merge --no-verify")]Merge {/// Target branch to merge into (defaults to default branch)target: Option<String>,@@ -278,7 +278,7 @@ Skip pre-merge commands:/// Skip all project hooks (pre-merge-command)#[arg(long)]- no_hooks: bool,+ no_verify: bool,/// Skip approval prompts for commands#[arg(short, long)]@@ -435,12 +435,12 @@ fn main() {},Commands::Dev { action } => match action {DevCommand::RunHook { hook_type, force } => handle_dev_run_hook(hook_type, force),- DevCommand::Commit { force, no_hooks } => handle_dev_commit(force, no_hooks),+ DevCommand::Commit { force, no_verify } => handle_dev_commit(force, no_verify),DevCommand::Squash {target,force,- no_hooks,- } => handle_dev_squash(target.as_deref(), force, no_hooks),+ no_verify,+ } => handle_dev_squash(target.as_deref(), force, no_verify),DevCommand::Push {target,allow_merge_commits,@@ -463,19 +463,19 @@ fn main() {base,execute,force,- no_hooks,+ no_verify,} => WorktrunkConfig::load().git_context("Failed to load config").and_then(|config| {// Execute switch operation (creates worktree, runs post-create hooks)let result =- handle_switch(&branch, create, base.as_deref(), force, no_hooks, &config)?;+ handle_switch(&branch, create, base.as_deref(), force, no_verify, &config)?;// Show success message (temporal locality: immediately after worktree creation)handle_switch_output(&result, &branch, execute.as_deref())?;// Now spawn post-start hooks (background processes, after success message)- if !no_hooks {+ if !no_verify {let repo = Repository::current();commands::worktree::spawn_post_start_commands(result.path(),@@ -542,14 +542,14 @@ fn main() {target,squash_enabled,keep,- no_hooks,+ no_verify,force,tracked_only,} => handle_merge(target.as_deref(),squash_enabled,keep,- no_hooks,+ no_verify,force,tracked_only,),diff --git a/tests/snapshots/integration__integration_tests__init__init_bash.snap b/tests/snapshots/integration__integration_tests__init__init_bash.snapindex a3216f2da..66a0f48cd 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/.tmpp3kdWd/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp4mPiBI/test-config.toml---success: trueexit_code: 0@@ -368,7 +368,7 @@ _wt() {return 0;;wt__dev__commit)- opts="-f -v -h --force --no-hooks --verbose --help"+ opts="-f -v -h --force --no-verify --verbose --help"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -424,7 +424,7 @@ _wt() {return 0;;wt__dev__squash)- opts="-f -v -h --force --no-hooks --verbose --help [TARGET]"+ opts="-f -v -h --force --no-verify --verbose --help [TARGET]"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -470,7 +470,7 @@ _wt() {return 0;;wt__merge)- opts="-k -f -v -h --no-squash --keep --no-hooks --force --tracked-only --verbose --help [TARGET]"+ opts="-k -f -v -h --no-squash --keep --no-verify --force --tracked-only --verbose --help [TARGET]"if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -512,7 +512,7 @@ _wt() {return 0;;wt__switch)- opts="-c -b -x -f -v -h --create --base --execute --force --no-hooks --verbose --help <BRANCH>"+ opts="-c -b -x -f -v -h --create --base --execute --force --no-verify --verbose --help <BRANCH>"if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; 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 318aa645f..92a7a9d2e 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/.tmpIAOMmN/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpH7LwKy/test-config.toml---success: trueexit_code: 0@@ -257,11 +257,11 @@ 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 run-hook" -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 run-hook" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from commit" -s f -l force -d 'Skip command approval prompts'-complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from commit" -l no-hooks -d 'Skip all project hooks (pre-commit-command)'+complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from commit" -l no-verify -d 'Skip all project hooks (pre-commit-command)'complete -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-hooks -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-squash-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)'@@ -280,7 +280,7 @@ complete -c wt -n "__fish_wt_using_subcommand switch" -s b -l base -d 'Base brancomplete -c wt -n "__fish_wt_using_subcommand switch" -s x -l execute -d 'Execute command after switching' -rcomplete -c wt -n "__fish_wt_using_subcommand switch" -s c -l create -d 'Create a new branch'complete -c wt -n "__fish_wt_using_subcommand switch" -s f -l force -d 'Skip confirmation prompt'-complete -c wt -n "__fish_wt_using_subcommand switch" -l no-hooks -d 'Skip all project hooks (post-create, post-start)'+complete -c wt -n "__fish_wt_using_subcommand switch" -l no-verify -d 'Skip all project hooks (post-create, post-start)'complete -c wt -n "__fish_wt_using_subcommand switch" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'complete -c wt -n "__fish_wt_using_subcommand switch" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand remove" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'@@ -290,7 +290,7 @@ complete -c wt -n "__fish_wt_using_subcommand push" -s v -l verbose -d 'Enable vcomplete -c wt -n "__fish_wt_using_subcommand push" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand merge" -l no-squash -d 'Disable squashing commits (by default, commits are squashed into one before merging)'complete -c wt -n "__fish_wt_using_subcommand merge" -s k -l keep -d 'Keep worktree after merging (don\'t remove)'-complete -c wt -n "__fish_wt_using_subcommand merge" -l no-hooks -d 'Skip all project hooks (pre-merge-command)'+complete -c wt -n "__fish_wt_using_subcommand merge" -l no-verify -d 'Skip all project hooks (pre-merge-command)'complete -c wt -n "__fish_wt_using_subcommand merge" -s f -l force -d 'Skip approval prompts for commands'complete -c wt -n "__fish_wt_using_subcommand merge" -l tracked-only -d 'Only stage tracked files (git add -u) instead of all files (git add -A)'complete -c wt -n "__fish_wt_using_subcommand merge" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'diff --git a/tests/snapshots/integration__integration_tests__init__init_zsh.snap b/tests/snapshots/integration__integration_tests__init__init_zsh.snapindex 13c619b31..b68fe99cf 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/.tmpVE3LFA/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpb12hgn/test-config.toml---success: trueexit_code: 0@@ -255,7 +255,7 @@ _arguments "${_arguments_options[@]}" : \_arguments "${_arguments_options[@]}" : \'-f[Skip command approval prompts]' \'--force[Skip command approval prompts]' \-'--no-hooks[Skip all project hooks (pre-commit-command)]' \+'--no-verify[Skip all project hooks (pre-commit-command)]' \'-v[Enable verbose output (show git commands and debug info)]' \'--verbose[Enable verbose output (show git commands and debug info)]' \'-h[Print help]' \@@ -266,7 +266,7 @@ _arguments "${_arguments_options[@]}" : \_arguments "${_arguments_options[@]}" : \'-f[Skip command approval prompts]' \'--force[Skip command approval prompts]' \-'--no-hooks[Skip all project hooks (pre-squash-command)]' \+'--no-verify[Skip all project hooks (pre-squash-command)]' \'-v[Enable verbose output (show git commands and debug info)]' \'--verbose[Enable verbose output (show git commands and debug info)]' \'-h[Print help]' \@@ -320,7 +320,7 @@ _arguments "${_arguments_options[@]}" : \'--create[Create a new branch]' \'-f[Skip confirmation prompt]' \'--force[Skip confirmation prompt]' \-'--no-hooks[Skip all project hooks (post-create, post-start)]' \+'--no-verify[Skip all project hooks (post-create, post-start)]' \'-v[Enable verbose output (show git commands and debug info)]' \'--verbose[Enable verbose output (show git commands and debug info)]' \'-h[Print help]' \@@ -352,7 +352,7 @@ _arguments "${_arguments_options[@]}" : \'--no-squash[Disable squashing commits (by default, commits are squashed into one before merging)]' \'-k[Keep worktree after merging (don'\''t remove)]' \'--keep[Keep worktree after merging (don'\''t remove)]' \-'--no-hooks[Skip all project hooks (pre-merge-command)]' \+'--no-verify[Skip all project hooks (pre-merge-command)]' \'-f[Skip approval prompts for commands]' \'--force[Skip approval prompts for commands]' \'--tracked-only[Only stage tracked files (git add -u) instead of all files (git add -A)]' \diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_no_hooks.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_no_hooks.snapindex 9711ab160..3c8654d96 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_no_hooks.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_no_hooks.snap@@ -17,24 +17,17 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpNmojSk/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpnZfGqh/test-config.toml----success: true-exit_code: 0+success: false+exit_code: 2----- stdout ------π‘ [2mOnly 1 commit since [0m[1m[36mmain[0m[2m - no squashing needed[0m-π [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 Add feature file-- feature.txt | 1 [32m+[m- 1 file changed, 1 insertion(+)+----- stderr -----+[1m[31merror:[0m unexpected argument '[33m--no-hooks[0m' found-β [32mMerged to [1m[32mmain[0m (1 commit, 1 file, [32m+1[0m) [0m-π [36mCleaning up worktree...[0m+ [32mtip:[0m to pass '[33m--no-hooks[0m' as a value, use '[32m-- --no-hooks[0m'-β [32mReturned to primary at [1m[32m[REPO][0m[0m+[1m[4mUsage:[0m [1mwt merge[0m <TARGET>------ stderr -----+For more information, try '[1m--help[0m'.diff --git a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_execute_still_runs.snap b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_execute_still_runs.snapindex 785ec919b..042f494f0 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_execute_still_runs.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_execute_still_runs.snap@@ -20,15 +20,17 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp1P1ouy/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpWZOCzV/test-config.toml----success: true-exit_code: 0+success: false+exit_code: 2----- stdout ------β [32mCreated new worktree for [1m[32mno-hooks-test[0m[32m at [1m[32m[REPO].no-hooks-test[0m-π [36mExecuting (--execute):[0m-[40m [0m [1m[34mecho[0m [32m'execute command runs'[0m[0m--execute command runs----- stderr -----+[1m[31merror:[0m unexpected argument '[33m--no-hooks[0m' found++ [32mtip:[0m to pass '[33m--no-hooks[0m' as a value, use '[32m-- --no-hooks[0m'++[1m[4mUsage:[0m [1mwt switch[0m [1m--create[0m [1m--execute[0m <EXECUTE> <BRANCH>++For more information, try '[1m--help[0m'.diff --git a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_existing.snap b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_existing.snapindex e67f25d62..fb0120868 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_existing.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_existing.snap@@ -19,15 +19,17 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpS8ulIg/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpwyxDwb/test-config.toml----success: true-exit_code: 0+success: false+exit_code: 2----- stdout ------β [32mSwitched to worktree for [1m[32mexisting-no-hooks[0m[32m at [1m[32m[WORKTREE_EXISTING_NO_HOOKS][0m-π [36mExecuting (--execute):[0m-[40m [0m [1m[34mecho[0m [32m'execute still runs'[0m[0m--execute still runs----- stderr -----+[1m[31merror:[0m unexpected argument '[33m--no-hooks[0m' found++ [32mtip:[0m to pass '[33m--no-hooks[0m' as a value, use '[32m-- --no-hooks[0m'++[1m[4mUsage:[0m [1mwt switch[0m [1m--execute[0m <EXECUTE> <BRANCH>++For more information, try '[1m--help[0m'.diff --git a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snap b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snapindex 206180199..112b631e5 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snap@@ -15,17 +15,21 @@ info:GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/nullGIT_EDITOR: ""- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpGFuEpJ+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpN69x37LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpYu0uhp/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpvCFyxF/test-config.toml----success: true-exit_code: 0+success: false+exit_code: 2----- stdout ------β [32mCreated new worktree for [1m[32mno-post-start[0m[32m at [1m[32m[REPO].no-post-start[0m--To enable automatic cd, run: wt config shell----- stderr -----+[1m[31merror:[0m unexpected argument '[33m--no-hooks[0m' found++ [32mtip:[0m to pass '[33m--no-hooks[0m' as a value, use '[32m-- --no-hooks[0m'++[1m[4mUsage:[0m [1mwt switch[0m [1m--create[0m <BRANCH>++For more information, try '[1m--help[0m'.diff --git a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_with_force.snap b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_with_force.snapindex 17dff8218..b8f200bf0 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_with_force.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_with_force.snap@@ -16,17 +16,21 @@ info:GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/nullGIT_EDITOR: ""- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpJE9SyH+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmptIKQqYLANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpQYtIa0/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpcHm4m1/test-config.toml----success: true-exit_code: 0+success: false+exit_code: 2----- stdout ------β [32mCreated new worktree for [1m[32mforce-no-hooks[0m[32m at [1m[32m[REPO].force-no-hooks[0m--To enable automatic cd, run: wt config shell----- stderr -----+[1m[31merror:[0m unexpected argument '[33m--no-hooks[0m' found++ [32mtip:[0m to pass '[33m--no-hooks[0m' as a value, use '[32m-- --no-hooks[0m'++[1m[4mUsage:[0m [1mwt switch[0m [1m--create[0m [1m--force[0m <BRANCH>++For more information, try '[1m--help[0m'.