Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
fix(hooks): correct pre-start docstring; rename mismatched test (#2879)
Maximilian Roosd8d94bd9d33d
diff --git a/src/config/hooks.rs b/src/config/hooks.rsindex 44ed7a04e..dda57b078 100644--- a/src/config/hooks.rs+++ b/src/config/hooks.rs@@ -24,7 +24,7 @@ pub struct HooksConfig {)]pub post_switch: Option<CommandConfig>,- /// Commands to execute before worktree creation (blocking)+ /// Commands to execute after worktree creation (blocking, fail-fast)#[serde(default,rename = "pre-start",diff --git a/tests/integration_tests/user_hooks.rs b/tests/integration_tests/user_hooks.rsindex ad73e7c4f..090b5b724 100644--- a/tests/integration_tests/user_hooks.rs+++ b/tests/integration_tests/user_hooks.rs@@ -158,7 +158,7 @@ approved-commands = ["echo 'PROJECT_HOOK' > project_marker.txt"]}#[rstest]-fn test_user_post_start_hook_failure(repo: TestRepo) {+fn test_user_pre_start_hook_failure(repo: TestRepo) {// Write user config with failing hookrepo.write_test_config(r#"[pre-start]@@ -168,7 +168,7 @@ failing = "exit 1"// A failing pre-start hook aborts with FailFast. The worktree is created// before pre-start runs, so it exists even though the command exits non-zero.- snapshot_switch("user_post_start_failure", &repo, &["--create", "feature"]);+ snapshot_switch("user_pre_start_failure", &repo, &["--create", "feature"]);// Worktree exists (created before pre-start ran) but the command failedlet worktree_path = repo.root_path().parent().unwrap().join("repo.feature");diff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_failure.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_start_failure.snapsimilarity index 100%rename from tests/snapshots/integration__integration_tests__user_hooks__user_post_start_failure.snaprename to tests/snapshots/integration__integration_tests__user_hooks__user_pre_start_failure.snap