From 68c8b13abb6b52b1745feca3031decdb4d93bacb Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 30 Nov 2026 05:21:27 -0500 Subject: Move hooks to hooks/. --- HOOKS.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 HOOKS.txt (limited to 'HOOKS.txt') diff --git a/HOOKS.txt b/HOOKS.txt new file mode 100644 index 0000000..fa371e2 --- /dev/null +++ b/HOOKS.txt @@ -0,0 +1,38 @@ +Git Hooks +========= + +- pre-commit: A git hook every SBo contributor should use, that + automatically calls sbolint and stops you from committing builds that + don't pass sbolint. + +- commit-msg: A git hook every SBo contributor should use, that + checks the formatting of commit messages, and adds the + "category/name: " prefix. + +- prepare-commit-msg: A git hook that adds the "Signed-off-by" line + to every commit message. You should *not* use this unless you are + either an SBo admin, or have received permission from the admins + to "sign off" commits. + +- pre-receive: A git hook that's installed on the SBo git server. + It's a "server-side" hook, so it's not that useful anywhere else, + but it's included here for reference. If you have an intermediate + "staging" git server where you push your changes before pushing + them to SBo or git(hub|lab), you can use this hook there. + +To use these hooks, copy them to your local git worktree (where you +run "git commit", "git push", etc commands), like so: + + cp pre-commit commit-msg /path/to/slackbuilds/.git/hooks + +...and make sure they have +x permission (chmod as needed). + +For documentation on the hooks themselves, see the comments in the +scripts. + +If you ever need to bypass all the git hooks, you can use: + + git commit -n + +Also, pre-commit and commit-msg can be selectively disabled with +environment variables. -- cgit v1.2.3