diff options
| author | 2026-05-19 16:50:52 +0100 | |
|---|---|---|
| committer | 2026-05-19 16:50:52 +0100 | |
| commit | ae04627b43b4d533088b8a389e5462efed2ae8f6 (patch) | |
| tree | f4083e02789c5803691defad7aa760abe40d9750 /README.md | |
| parent | 0fc39faa90f97db24043017a845f1754b4bb8b84 (diff) | |
| download | dotfiles-ae04627b43b4d533088b8a389e5462efed2ae8f6.tar.gz dotfiles-ae04627b43b4d533088b8a389e5462efed2ae8f6.tar.bz2 dotfiles-ae04627b43b4d533088b8a389e5462efed2ae8f6.zip | |
refactor(git): use classic .git/hooks/ for per-clone override
Switch the dispatcher's per-clone override location from the
bespoke .git/hooks-local/ to the classic .git/hooks/. This is:
- The untracked location git has used since forever, so no new
convention to learn.
- Where husky, lefthook, pre-commit-the-tool, and most other hook
managers install by default — they now "just work" again under our
global core.hooksPath.
git init's *.sample files don't collide because the dispatcher only
matches the exact hook name and the executable bit. The only behavior
change is that a forgotten legacy .git/hooks/pre-commit from before
core.hooksPath was set will start running again — that's arguably
restoring expected git semantics, not a regression.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -136,7 +136,7 @@ Verify with `sudo nft list ruleset`. The user-level hooks at `~/.config/git/hooks/` (set as `core.hooksPath` in `dot_config/git/config`) apply globally and auto-dispatch into the repo's hooks if present. Lookup order, first wins: -1. `<git-dir>/hooks-local/<name>` — untracked per-clone override. Use this to replace a tracked hook on a shared repo without affecting teammates. +1. `<git-dir>/hooks/<name>` — the classic untracked per-clone location (where `husky` / `lefthook` / `pre-commit` install by default). Use this to replace a tracked hook on a shared repo without affecting teammates. 2. `<repo-top>/.githooks/<name>` — the project's tracked, shared hook. Projects opt in by just dropping a file at `.githooks/<name>` — no `core.hooksPath` override, no passthrough stubs. Per-event behavior: |
