Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

refactor(config): Rename pre-merge-check to pre-merge-command for consistency

Maximilian Roos8714fbc0d9fc
diff --git a/.config/wt.toml b/.config/wt.toml
index 8ea7c0051..9f2cb1001 100644
--- a/.config/wt.toml
+++ b/.config/wt.toml
@@ -23,9 +23,9 @@ echo 'βœ“ CoW seeded target/'
# Available template variables: {repo}, {branch}, {worktree}, {repo_root}, {target}
post-merge-command = "cargo install --path ."
-# Pre-merge checks
+# Pre-merge commands
# These run sequentially before merging to main
# All commands must exit with code 0 for merge to proceed
-[pre-merge-check]
+[pre-merge-command]
pre-commit = "pre-commit run --all-files"
-insta = "cargo insta test"
+insta = "cargo insta test --test-runner nextest --test-runner-fallback true"
diff --git a/README.md b/README.md
index 6b01b71aa..fc912ae4c 100644
--- a/README.md
+++ b/README.md
@@ -125,7 +125,7 @@ Projects can define commands that run automatically when creating or switching t
"type check" = "npm run type-check -- --watch"
# Validation before merging (blocking, fail-fast)
-[pre-merge-check]
+[pre-merge-command]
"tests" = "npm test"
"lint" = "npm run lint"
@@ -139,7 +139,7 @@ Projects can define commands that run automatically when creating or switching t
- **`post-create-command`**: Runs sequentially after creating a worktree. Use for setup tasks like installing dependencies.
- **`post-start-command`**: Runs in parallel as background processes after switching to a worktree. Use for dev servers and watchers.
-- **`pre-merge-check`**: Runs sequentially before merging. All commands must succeed for the merge to proceed. Use for validation (tests, lints).
+- **`pre-merge-command`**: Runs sequentially before merging. All commands must succeed for the merge to proceed. Use for validation (tests, lints).
- **`post-merge-command`**: Runs sequentially in the main worktree after a successful merge and push. Use for deployment, notifications, or updating global state.
Template variables expand at runtime:
@@ -147,22 +147,23 @@ Template variables expand at runtime:
- `{branch}` - Current branch
- `{worktree}` - Absolute path to worktree
- `{repo_root}` - Absolute path to repository root
-- `{target}` - Target branch (pre-merge-check and post-merge-command only)
+- `{target}` - Target branch (pre-merge-command and post-merge-command only)
### Available Hooks
-Worktrunk provides three lifecycle hooks for project automation:
+Worktrunk provides four lifecycle hooks for project automation:
| Hook | When It Runs | Execution | Failure Behavior |
|------|--------------|-----------|------------------|
| **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-merge-check** | Before committing/rebasing during `wt merge` | Sequential, blocking, fail-fast | Terminates merge immediately |
+| **pre-merge-command** | Before committing/rebasing during `wt merge` | 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 |
**Skipping hooks:**
- Use `--no-hooks` to skip all project hooks
- `wt switch --no-hooks` skips post-create and post-start
-- `wt merge --no-hooks` skips pre-merge-check
+- `wt merge --no-hooks` skips pre-merge-command
**Security:**
Commands require approval on first run. Approved commands are saved globally per project. Use `--force` to bypass approval prompts.
@@ -250,7 +251,7 @@ wt merge main # merge commits as-is
wt merge main --squash # squash all commits
wt merge main --keep # keep worktree after merging
wt merge main -m "Custom message instruction"
-wt merge main --no-hooks # skip pre-merge-check hook
+wt merge main --no-hooks # skip pre-merge-command hook
```
## Configuration
diff --git a/src/commands/merge.rs b/src/commands/merge.rs
index 477bd131f..d66c9cf64 100644
--- a/src/commands/merge.rs
+++ b/src/commands/merge.rs
@@ -49,7 +49,7 @@ pub fn handle_merge(
let worktree_path = std::env::current_dir().map_err(|e| {
GitError::CommandFailed(format!("Failed to get current directory: {}", e))
})?;
- run_pre_merge_checks(
+ run_pre_merge_commands(
&project_config,
&current_branch,
&target_branch,
@@ -336,8 +336,8 @@ fn handle_squash(target_branch: &str) -> Result<Option<usize>, GitError> {
Ok(Some(commit_count))
}
-/// Run pre-merge checks sequentially (blocking, fail-fast)
-fn run_pre_merge_checks(
+/// Run pre-merge commands sequentially (blocking, fail-fast)
+fn run_pre_merge_commands(
project_config: &ProjectConfig,
current_branch: &str,
target_branch: &str,
@@ -346,7 +346,7 @@ fn run_pre_merge_checks(
config: &WorktrunkConfig,
force: bool,
) -> Result<(), GitError> {
- let Some(pre_merge_config) = &project_config.pre_merge_check else {
+ let Some(pre_merge_config) = &project_config.pre_merge_command else {
return Ok(());
};
@@ -357,10 +357,10 @@ fn run_pre_merge_checks(
&ctx,
false,
&[("target", target_branch)],
- "Pre-merge checks",
+ "Pre-merge commands",
|_, command| {
let dim = AnstyleStyle::new().dimmed();
- eprintln!("{dim}Skipping pre-merge check: {command}{dim:#}");
+ eprintln!("{dim}Skipping pre-merge command: {command}{dim:#}");
},
)?;
for prepared in commands {
@@ -368,15 +368,15 @@ fn run_pre_merge_checks(
use worktrunk::styling;
eprintln!(
- "πŸ”„ {CYAN}Running pre-merge check {CYAN_BOLD}{name}{CYAN_BOLD:#}:{CYAN:#}",
+ "πŸ”„ {CYAN}Running pre-merge command {CYAN_BOLD}{name}{CYAN_BOLD:#}:{CYAN:#}",
name = prepared.name
);
eprint!("{}", format_with_gutter(&prepared.expanded, "", None)); // Gutter at column 0
let _ = styling::stderr().flush();
if let Err(e) = execute_command_in_worktree(worktree_path, &prepared.expanded) {
- return Err(GitError::PreMergeCheckFailed {
- check_name: prepared.name.clone(),
+ return Err(GitError::PreMergeCommandFailed {
+ command_name: prepared.name.clone(),
error: e.to_string(),
});
}
diff --git a/src/config.rs b/src/config.rs
index de4293ca8..4dae8240b 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -72,7 +72,7 @@ pub struct CommitGenerationConfig {
/// - `{worktree}` - Absolute path to the worktree
/// - `{repo_root}` - Absolute path to the repository root
///
-/// Additionally, `pre-merge-check` commands support:
+/// Additionally, `pre-merge-command` commands support:
/// - `{target}` - Target branch for the merge (e.g., "main")
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
pub struct ProjectConfig {
@@ -95,8 +95,8 @@ pub struct ProjectConfig {
/// All commands must exit with code 0 for merge to proceed
///
/// Available template variables: `{repo}`, `{branch}`, `{worktree}`, `{repo_root}`, `{target}`
- #[serde(default, rename = "pre-merge-check")]
- pub pre_merge_check: Option<CommandConfig>,
+ #[serde(default, rename = "pre-merge-command")]
+ pub pre_merge_command: Option<CommandConfig>,
/// Commands to execute after successful merge in the main worktree (blocking)
/// Supports string (single command), array (sequential), or table (named, sequential)
@@ -529,7 +529,7 @@ mod tests {
let config = ProjectConfig::default();
assert!(config.post_create_command.is_none());
assert!(config.post_start_command.is_none());
- assert!(config.pre_merge_check.is_none());
+ assert!(config.pre_merge_command.is_none());
assert!(config.post_merge_command.is_none());
}
@@ -589,20 +589,20 @@ mod tests {
}
#[test]
- fn test_pre_merge_check_single() {
- let toml = r#"pre-merge-check = "cargo test""#;
+ fn test_pre_merge_command_single() {
+ let toml = r#"pre-merge-command = "cargo test""#;
let config: ProjectConfig = toml::from_str(toml).unwrap();
assert!(matches!(
- config.pre_merge_check,
+ config.pre_merge_command,
Some(CommandConfig::Single(_))
));
}
#[test]
- fn test_pre_merge_check_multiple() {
- let toml = r#"pre-merge-check = ["cargo fmt -- --check", "cargo test"]"#;
+ fn test_pre_merge_command_multiple() {
+ let toml = r#"pre-merge-command = ["cargo fmt -- --check", "cargo test"]"#;
let config: ProjectConfig = toml::from_str(toml).unwrap();
- match config.pre_merge_check {
+ match config.pre_merge_command {
Some(CommandConfig::Multiple(cmds)) => {
assert_eq!(cmds.len(), 2);
assert_eq!(cmds[0], "cargo fmt -- --check");
@@ -613,15 +613,15 @@ mod tests {
}
#[test]
- fn test_pre_merge_check_named() {
+ fn test_pre_merge_command_named() {
let toml = r#"
- [pre-merge-check]
+ [pre-merge-command]
format = "cargo fmt -- --check"
lint = "cargo clippy"
test = "cargo test"
"#;
let config: ProjectConfig = toml::from_str(toml).unwrap();
- match config.pre_merge_check {
+ match config.pre_merge_command {
Some(CommandConfig::Named(cmds)) => {
assert_eq!(cmds.len(), 3);
assert_eq!(
diff --git a/src/git.rs b/src/git.rs
index a2d4baa07..6ea44e30c 100644
--- a/src/git.rs
+++ b/src/git.rs
@@ -24,8 +24,8 @@ pub enum GitError {
UntrackedFiles,
/// Working tree has staged changes but no commits
StagedChangesWithoutCommits,
- /// Pre-merge check failed
- PreMergeCheckFailed { check_name: String, error: String },
+ /// Pre-merge command failed
+ PreMergeCommandFailed { command_name: String, error: String },
/// Working tree has uncommitted changes
UncommittedChanges,
/// Branch already exists (when trying to create)
@@ -91,12 +91,15 @@ impl std::fmt::Display for GitError {
)
}
- // Pre-merge check failed
- GitError::PreMergeCheckFailed { check_name, error } => {
+ // Pre-merge command failed
+ GitError::PreMergeCommandFailed {
+ command_name,
+ error,
+ } => {
let error_bold = ERROR.bold();
write!(
f,
- "{ERROR_EMOJI} {ERROR}Pre-merge check failed: {error_bold}{check_name}{error_bold:#}{ERROR:#}\n\n{error}\n\n{HINT_EMOJI} {HINT}Use --no-hooks to skip pre-merge checks{HINT:#}"
+ "{ERROR_EMOJI} {ERROR}Pre-merge command failed: {error_bold}{command_name}{error_bold:#}{ERROR:#}\n\n{error}\n\n{HINT_EMOJI} {HINT}Use --no-hooks to skip pre-merge commands{HINT:#}"
)
}
diff --git a/src/main.rs b/src/main.rs
index f832c6816..59d506d56 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -148,9 +148,9 @@ The merge operation follows a strict order designed for fail-fast execution:
Verifies current branch exists (not detached HEAD) and determines target branch
(defaults to repository's default branch).
-2. Run pre-merge checks
- Runs commands from project config's [[pre-merge-check]] before any git operations.
- These receive {target} placeholder for the target branch. Checks run sequentially
+2. Run pre-merge commands
+ Runs commands from project config's [pre-merge-command] before any git operations.
+ These receive {target} placeholder for the target branch. Commands run sequentially
and any failure aborts the merge immediately. Skip with --no-verify.
3. Auto-commit uncommitted changes
@@ -183,7 +183,7 @@ Squash commits before merging:
Keep worktree after merging:
wt merge --keep
-Skip pre-merge checks:
+Skip pre-merge commands:
wt merge --no-verify")]
Merge {
/// Target branch to merge into (defaults to default branch)
@@ -201,7 +201,7 @@ Skip pre-merge checks:
#[arg(short = 'm', long)]
message: Option<String>,
- /// Skip all project hooks (pre-merge-check)
+ /// Skip all project hooks (pre-merge-command)
#[arg(long)]
no_hooks: bool,
diff --git a/tests/integration_tests/merge.rs b/tests/integration_tests/merge.rs
index e9fbb9650..953405c33 100644
--- a/tests/integration_tests/merge.rs
+++ b/tests/integration_tests/merge.rs
@@ -801,16 +801,19 @@ fn test_merge_auto_commit_and_squash() {
}
#[test]
-fn test_merge_pre_merge_check_success() {
+fn test_merge_pre_merge_command_success() {
let mut repo = TestRepo::new();
repo.commit("Initial commit");
repo.setup_remote("main");
- // Create project config with pre-merge check
+ // Create project config with pre-merge command
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-merge-check = "exit 0""#)
- .expect("Failed to write config");
+ fs::write(
+ config_dir.join("wt.toml"),
+ r#"pre-merge-command = "exit 0""#,
+ )
+ .expect("Failed to write config");
repo.commit("Add config");
@@ -843,7 +846,7 @@ fn test_merge_pre_merge_check_success() {
// Merge with --force to skip approval prompts
snapshot_merge(
- "merge_pre_merge_check_success",
+ "merge_pre_merge_command_success",
&repo,
&["main", "--force"],
Some(&feature_wt),
@@ -851,16 +854,19 @@ fn test_merge_pre_merge_check_success() {
}
#[test]
-fn test_merge_pre_merge_check_failure() {
+fn test_merge_pre_merge_command_failure() {
let mut repo = TestRepo::new();
repo.commit("Initial commit");
repo.setup_remote("main");
- // Create project config with failing pre-merge check
+ // Create project config with failing pre-merge command
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-merge-check = "exit 1""#)
- .expect("Failed to write config");
+ fs::write(
+ config_dir.join("wt.toml"),
+ r#"pre-merge-command = "exit 1""#,
+ )
+ .expect("Failed to write config");
repo.commit("Add config");
@@ -891,9 +897,9 @@ fn test_merge_pre_merge_check_failure() {
.output()
.expect("Failed to commit");
- // Merge with --force - pre-merge check should fail and block merge
+ // Merge with --force - pre-merge command should fail and block merge
snapshot_merge(
- "merge_pre_merge_check_failure",
+ "merge_pre_merge_command_failure",
&repo,
&["main", "--force"],
Some(&feature_wt),
@@ -901,16 +907,19 @@ fn test_merge_pre_merge_check_failure() {
}
#[test]
-fn test_merge_pre_merge_check_no_hooks() {
+fn test_merge_pre_merge_command_no_hooks() {
let mut repo = TestRepo::new();
repo.commit("Initial commit");
repo.setup_remote("main");
- // Create project config with failing pre-merge check
+ // Create project config with failing pre-merge command
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-merge-check = "exit 1""#)
- .expect("Failed to write config");
+ fs::write(
+ config_dir.join("wt.toml"),
+ r#"pre-merge-command = "exit 1""#,
+ )
+ .expect("Failed to write config");
repo.commit("Add config");
@@ -941,9 +950,9 @@ fn test_merge_pre_merge_check_no_hooks() {
.output()
.expect("Failed to commit");
- // Merge with --no-hooks - should skip pre-merge checks and succeed
+ // Merge with --no-hooks - should skip pre-merge commands and succeed
snapshot_merge(
- "merge_pre_merge_check_no_hooks",
+ "merge_pre_merge_command_no_hooks",
&repo,
&["main", "--no-hooks"],
Some(&feature_wt),
@@ -951,18 +960,18 @@ fn test_merge_pre_merge_check_no_hooks() {
}
#[test]
-fn test_merge_pre_merge_check_named() {
+fn test_merge_pre_merge_command_named() {
let mut repo = TestRepo::new();
repo.commit("Initial commit");
repo.setup_remote("main");
- // Create project config with named pre-merge checks
+ // Create project config with named pre-merge commands
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-merge-check]
+[pre-merge-command]
format = "exit 0"
lint = "exit 0"
test = "exit 0"
@@ -999,9 +1008,9 @@ test = "exit 0"
.output()
.expect("Failed to commit");
- // Merge with --force - all pre-merge checks should pass
+ // Merge with --force - all pre-merge commands should pass
snapshot_merge(
- "merge_pre_merge_check_named",
+ "merge_pre_merge_command_named",
&repo,
&["main", "--force"],
Some(&feature_wt),
@@ -1009,7 +1018,7 @@ test = "exit 0"
}
#[test]
-fn test_merge_pre_merge_check_stdout_stderr_ordering() {
+fn test_merge_pre_merge_command_stdout_stderr_ordering() {
let mut repo = TestRepo::new();
repo.commit("Initial commit");
repo.setup_remote("main");
@@ -1018,14 +1027,14 @@ fn test_merge_pre_merge_check_stdout_stderr_ordering() {
let fixtures_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures");
let script_path = fixtures_dir.join("mixed-output.sh");
- // Create project config with two named pre-merge checks that both output to stdout and stderr
+ // Create project config with two named pre-merge commands that both output to stdout and stderr
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"),
format!(
r#"
-[pre-merge-check]
+[pre-merge-command]
check1 = "{} check1 3"
check2 = "{} check2 3"
"#,
@@ -1072,7 +1081,7 @@ check2 = "{} check2 3"
// they're properly interleaved when both go to the terminal.
// The important verification is that within each stream, the ordering is correct.
snapshot_merge(
- "merge_pre_merge_check_stdout_stderr_ordering",
+ "merge_pre_merge_command_stdout_stderr_ordering",
&repo,
&["main", "--force"],
Some(&feature_wt),
@@ -1080,21 +1089,21 @@ check2 = "{} check2 3"
}
#[test]
-fn test_merge_pre_merge_check_combined_output() {
+fn test_merge_pre_merge_command_combined_output() {
use crate::common::run_with_combined_output;
let mut repo = TestRepo::new();
repo.commit("Initial commit");
repo.setup_remote("main");
- // Create project config with two named pre-merge checks that output to BOTH stdout and stderr
+ // Create project config with two named pre-merge commands that output to BOTH stdout and stderr
// This verifies the ordering is: header1 β†’ command1 β†’ stdout1 β†’ stderr1 β†’ header2 β†’ command2 β†’ stdout2 β†’ stderr2
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-merge-check]
+[pre-merge-command]
first = "echo 'STDOUT-FROM-FIRST' && echo 'STDERR-FROM-FIRST' >&2"
second = "echo 'STDOUT-FROM-SECOND' && echo 'STDERR-FROM-SECOND' >&2"
"#,
@@ -1135,7 +1144,7 @@ second = "echo 'STDOUT-FROM-SECOND' && echo 'STDERR-FROM-SECOND' >&2"
let settings = crate::common::setup_snapshot_settings(&repo);
settings.bind(|| {
- insta::assert_snapshot!("merge_pre_merge_check_combined_output", output);
+ insta::assert_snapshot!("merge_pre_merge_command_combined_output", output);
});
}
diff --git a/tests/snapshots/integration__integration_tests__init__init_fish.snap b/tests/snapshots/integration__integration_tests__init__init_fish.snap
index 276f68a4a..fdb816ae4 100644
--- a/tests/snapshots/integration__integration_tests__init__init_fish.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_fish.snap
@@ -15,7 +15,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: [TEST_CONFIG]
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpHIsONe/test-config.toml
---
success: true
exit_code: 0
@@ -220,7 +220,7 @@ complete -c wt -n "__fish_wt_using_subcommand push" -s h -l help -d 'Print help'
complete -c wt -n "__fish_wt_using_subcommand merge" -s m -l message -d 'Custom instruction for commit message generation' -r
complete -c wt -n "__fish_wt_using_subcommand merge" -s s -l squash -d 'Squash all commits 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-check)'
+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" -s f -l force -d 'Skip approval prompts for commands'
complete -c wt -n "__fish_wt_using_subcommand merge" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'
complete -c wt -n "__fish_wt_using_subcommand merge" -s h -l help -d 'Print help (see more with \'--help\')'
diff --git a/tests/snapshots/integration__integration_tests__init__init_zsh.snap b/tests/snapshots/integration__integration_tests__init__init_zsh.snap
index 8f2f9ee1b..a5fee683f 100644
--- a/tests/snapshots/integration__integration_tests__init__init_zsh.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_zsh.snap
@@ -15,7 +15,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: [TEST_CONFIG]
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpQGFV0d/test-config.toml
---
success: true
exit_code: 0
@@ -251,7 +251,7 @@ _arguments "${_arguments_options[@]}" : \
'--squash[Squash all commits 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-check)]' \
+'--no-hooks[Skip all project hooks (pre-merge-command)]' \
'-f[Skip approval prompts for commands]' \
'--force[Skip approval prompts for commands]' \
'-v[Enable verbose output (show git commands and debug info)]' \
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_combined_output.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap
similarity index 85%
rename from tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_combined_output.snap
rename to tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap
index d6e3aabfe..c224b5d42 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_combined_output.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap
@@ -4,11 +4,11 @@ expression: output
---
Exit code: 0
πŸ”„ Validating merge...
-πŸ”„ Running pre-merge check first:
+πŸ”„ Running pre-merge command first:
  echo 'STDOUT-FROM-FIRST' && echo 'STDERR-FROM-FIRST' >&2
STDOUT-FROM-FIRST
STDERR-FROM-FIRST
-πŸ”„ Running pre-merge check second:
+πŸ”„ Running pre-merge command second:
  echo 'STDOUT-FROM-SECOND' && echo 'STDERR-FROM-SECOND' >&2
STDOUT-FROM-SECOND
STDERR-FROM-SECOND
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap
similarity index 66%
rename from tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_failure.snap
rename to tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap
index 2d74faa48..cef159a49 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_failure.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: [TEST_CONFIG]
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpAVDI3d/test-config.toml
---
success: false
exit_code: 1
@@ -24,10 +24,10 @@ exit_code: 1
πŸ”„ Validating merge...
----- stderr -----
-πŸ”„ Running pre-merge check cmd:
+πŸ”„ Running pre-merge command cmd:
  exit 1
-❌ Pre-merge check failed: cmd
+❌ Pre-merge command failed: cmd
Command failed with exit code: exit status: 1
-πŸ’‘ Use --no-hooks to skip pre-merge checks
+πŸ’‘ Use --no-hooks to skip pre-merge commands
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_named.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap
similarity index 77%
rename from tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_named.snap
rename to tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap
index 4838f24ea..4bf50eed8 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_named.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: [TEST_CONFIG]
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpaXuyo7/test-config.toml
---
success: true
exit_code: 0
@@ -36,9 +36,9 @@ exit_code: 0
βœ… Returned to primary at [REPO]
----- stderr -----
-πŸ”„ Running pre-merge check format:
+πŸ”„ Running pre-merge command format:
  exit 0
-πŸ”„ Running pre-merge check lint:
+πŸ”„ Running pre-merge command lint:
  exit 0
-πŸ”„ Running pre-merge check test:
+πŸ”„ Running pre-merge command test:
  exit 0
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_no_hooks.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_no_hooks.snap
similarity index 100%
rename from tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_no_hooks.snap
rename to tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_no_hooks.snap
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_stdout_stderr_ordering.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap
similarity index 86%
rename from tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_stdout_stderr_ordering.snap
rename to tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap
index 842a491f4..a6dd06c99 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_stdout_stderr_ordering.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: [TEST_CONFIG]
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpzwRBzQ/test-config.toml
---
success: true
exit_code: 0
@@ -36,7 +36,7 @@ exit_code: 0
βœ… Returned to primary at [REPO]
----- stderr -----
-πŸ”„ Running pre-merge check check1:
+πŸ”„ Running pre-merge command check1:
  [PROJECT_ROOT]/tests/fixtures/mixed-output.sh
  check1 3
[check1] stdout line 1
@@ -47,7 +47,7 @@ exit_code: 0
[check1] stderr line 3
[check1] stdout complete
[check1] stderr complete
-πŸ”„ Running pre-merge check check2:
+πŸ”„ Running pre-merge command check2:
  [PROJECT_ROOT]/tests/fixtures/mixed-output.sh
  check2 3
[check2] stdout line 1
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap
similarity index 85%
rename from tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_success.snap
rename to tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap
index 5f0366d47..0af79e056 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_check_success.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: [TEST_CONFIG]
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpy2PylD/test-config.toml
---
success: true
exit_code: 0
@@ -36,5 +36,5 @@ exit_code: 0
βœ… Returned to primary at [REPO]
----- stderr -----
-πŸ”„ Running pre-merge check cmd:
+πŸ”„ Running pre-merge command cmd:
  exit 0