aboutsummaryrefslogtreecommitdiff
path: root/HOOKS.txt
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-11-30 05:21:27 -0500
committerB. Watson <urchlay@slackware.uk>2026-11-30 05:21:53 -0500
commit68c8b13abb6b52b1745feca3031decdb4d93bacb (patch)
treec98ba2e9edb2a4d31b0fa069842bc4a30e6c2f38 /HOOKS.txt
parentb512a44db0e8d276edaada569966bf37b513ef41 (diff)
downloadsbo-maintainer-tools-68c8b13abb6b52b1745feca3031decdb4d93bacb.tar.gz
Move hooks to hooks/.
Diffstat (limited to 'HOOKS.txt')
-rw-r--r--HOOKS.txt38
1 files changed, 38 insertions, 0 deletions
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 <args>
+
+Also, pre-commit and commit-msg can be selectively disabled with
+environment variables.