Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Configure worktree setup and pre-merge checks
Maximilian Roos8e0859be1274
diff --git a/.config/wt.toml b/.config/wt.tomlindex af3212982..ea9fd804f 100644--- a/.config/wt.toml+++ b/.config/wt.toml@@ -1,3 +1,26 @@+# Post-start commands for worktree setup+# These run after creating a new worktree+#+# Available template variables:+# {repo} - Repository name (e.g., "worktrunk.project-config")+# {branch} - Branch name with slashes replaced by dashes+# {worktree} - Path to the new worktree+# {repo_root} - Path to the main repository root+# Seed target/ from base worktree using CoW (copy-on-write)+# Each worktree gets its own target/ (avoids incremental build corruption)+# but seeded from base to warm-start builds (low disk usage)+# macOS: uses cp -c (clonefile on APFS)+# Linux: would need cp --reflink=auto (GNU coreutils) or rsync 3.2.3+ with --reflink+post-start-command = """+[ -d {repo_root}/target ] &&+[ ! -e {worktree}/target ] &&+cp -cR {repo_root}/target/. {worktree}/target/ &&+echo '✓ CoW seeded target/'+"""++# Pre-merge checks+# These run sequentially before merging to main+# All commands must exit with code 0 for merge to proceed[pre-merge-check]-check1 = "/Users/maximilian/workspace/worktrunk.stderr-out/tests/fixtures/mixed-output.sh check1 5"-check2 = "/Users/maximilian/workspace/worktrunk.stderr-out/tests/fixtures/mixed-output.sh check2 5"+pre-commit = "pre-commit run --all-files"+insta = "cargo insta test"