From ae04627b43b4d533088b8a389e5462efed2ae8f6 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Tue, 19 May 2026 16:50:52 +0100 Subject: refactor(git): use classic .git/hooks/ for per-clone override MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 0ec6147..453af2b 100644 --- a/README.md +++ b/README.md @@ -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. `/hooks-local/` — untracked per-clone override. Use this to replace a tracked hook on a shared repo without affecting teammates. +1. `/hooks/` — 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. `/.githooks/` — the project's tracked, shared hook. Projects opt in by just dropping a file at `.githooks/` — no `core.hooksPath` override, no passthrough stubs. Per-event behavior: -- cgit v1.3.1