docs: align README and CONTRIBUTING with commit-msg rules

Top-level and contributor README text now mention layout as well as width when
hooks gate commits.

- Note subject and bullet structure in README.md contributing blurb
- Mirror the same requirement in docs/CONTRIBUTING.md Git subsection
This commit is contained in:
Jukka Aho
2026-05-11 02:46:20 +03:00
parent 2bfc78a37c
commit cded31c388
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -86,8 +86,8 @@ what you changed.
**Git commits.** Keep history easy to read: small commits, usually one file; **Git commits.** Keep history easy to read: small commits, usually one file;
**two files** in one commit is fine when they are inseparable (e.g. a helper and **two files** in one commit is fine when they are inseparable (e.g. a helper and
its only caller). With `.githooks/` and `core.hooksPath`, **pre-commit** caps its only caller). With `.githooks/` and `core.hooksPath`, **pre-commit** caps
staged paths at two and **commit-msg** rejects log lines longer than **80 staged paths at two and **commit-msg** enforces subject, summary, `-` bullets,
characters** (wrap subject, summary, and bullets). If that workflow feels and an **80**-character line cap. If that workflow feels
unfamiliar, open your PR with tests passing and ask for help splitting history unfamiliar, open your PR with tests passing and ask for help splitting history
in review. in review.
+2 -2
View File
@@ -65,8 +65,8 @@ when rendering the website) rather than chasing false positives in the library.
unless you mean it. The full protocol is in unless you mean it. The full protocol is in
`.github/prompts/commit.prompt.md`. With `.github/prompts/commit.prompt.md`. With
`git config core.hooksPath .githooks`, **pre-commit** allows at most **two** `git config core.hooksPath .githooks`, **pre-commit** allows at most **two**
staged files per commit, and **commit-msg** rejects messages with any line staged files per commit, and **commit-msg** enforces the subject / summary /
longer than **80 characters** (merge commits skip the length check while bullet layout plus an **80**-character line cap (merge commits skip while
`.git/MERGE_HEAD` exists). `.git/MERGE_HEAD` exists).
- Match **commit message depth** to the patch: a short summary suffices for - Match **commit message depth** to the patch: a short summary suffices for
small edits; **large files, large diffs, or several concerns in one commit** small edits; **large files, large diffs, or several concerns in one commit**