File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # AGENTS.md
2+
3+ ## Common commands
4+ - Format: ` make fmt `
5+ - Run tests: ` make test `
6+ - Run full checks: ` make ci `
Original file line number Diff line number Diff line change @@ -149,52 +149,6 @@ git -C <path> worktreeinclude apply --json
149149- Evaluate success by exit code
150150- Use JSON ` summary ` and ` actions ` for details
151151
152- ## post-checkout auto-apply (manual setup)
153-
154- This project does not auto-install hooks. Use manual setup.
155-
156- ### Shared hooks (recommended)
157-
158- ``` sh
159- mkdir -p .githooks
160- cat > .githooks/post-checkout << 'EOF '
161- #!/bin/sh
162- set -eu
163-
164- old="$1"
165- if [ "$old" = "0000000000000000000000000000000000000000" ]; then
166- git worktreeinclude apply --quiet || true
167- fi
168- EOF
169- chmod +x .githooks/post-checkout
170- git config core.hooksPath .githooks
171- ```
172-
173- Generated ` post-checkout ` :
174-
175- ``` sh
176- #! /bin/sh
177- set -eu
178-
179- old=" $1 "
180- if [ " $old " = " 0000000000000000000000000000000000000000" ]; then
181- git worktreeinclude apply --quiet || true
182- fi
183- ```
184-
185- - Runs only for newly created worktree/clone-style checkouts (` old ` is 40 zeros)
186- - Failure is non-fatal to avoid breaking checkout workflow
187-
188- ### Existing hook managers (husky, etc.)
189-
190- - Do not overwrite existing ` post-checkout ` ; append the ` if ` block.
191- - If ` core.hooksPath ` is already configured, add the hook within that convention.
192-
193- Notes:
194-
195- - ` git worktree add --no-checkout ` may not trigger ` post-checkout ` .
196- - In that case, run ` git worktreeinclude apply ` manually.
197-
198152## Exit codes
199153
200154- ` 0 ` : success
You can’t perform that action at this time.
0 commit comments