fix: activate native protocol hooks in nested worktrees
This commit is contained in:
parent
67e6fcdd38
commit
97858eb8b5
7 changed files with 48 additions and 4 deletions
|
|
@ -5,13 +5,18 @@ surfaces; GLS-0844 (GHNQG) is the quality authority.
|
|||
|
||||
## Installation
|
||||
|
||||
`pnpm install` runs the `prepare` script and installs the hooks into
|
||||
`.git/hooks`. To reinstall them, run:
|
||||
`pnpm install` runs the `prepare` script and binds Git's local hook path to
|
||||
this product's `.husky/` directory. This also works when the product is nested
|
||||
inside a larger Git worktree. To restore the binding without installing
|
||||
dependencies, run:
|
||||
|
||||
```bash
|
||||
pnpm exec husky
|
||||
bash scripts/install-guanghu-native-hooks.sh
|
||||
```
|
||||
|
||||
The hook itself enters the product root before running any protocol command,
|
||||
so its behavior does not depend on the caller's current directory.
|
||||
|
||||
## Native policy
|
||||
|
||||
- Commit on `main` or in a detached verification worktree intended for direct
|
||||
|
|
|
|||
Loading…
Reference in a new issue