Skip to content

chore: normalize commit messages - #202

Draft
gregggreg wants to merge 3 commits into
marcus:docs-backfillfrom
gregggreg:chore/commit-normalize-20260730
Draft

chore: normalize commit messages#202
gregggreg wants to merge 3 commits into
marcus:docs-backfillfrom
gregggreg:chore/commit-normalize-20260730

Conversation

@gregggreg

@gregggreg gregggreg commented Jul 30, 2026

Copy link
Copy Markdown

Summary

  • add a repository-managed Conventional Commit normalizer for future commits only; existing history is not rewritten
  • normalize unambiguous type, scope, and whitespace while preserving bodies, Nightshift trailers, and commit-message file identity
  • exempt Git-generated merge, revert, autosquash, stash, and combined-commit messages, including custom comment prefixes
  • adopt .githooks without dropping the existing formatting, vet, and build checks
  • add a conflict-safe, repository-local hook installer plus shell regression coverage and developer documentation

Iteration 3

  • inspect every repository-local core.hooksPath value instead of only the last value
  • reject ambiguous duplicate, conflicting, reordered, and empty additional hook-path values without modifying .git/config
  • add regression coverage for both value orderings and the empty-value edge case

Verification

  • make test-commit-normalizer (74 assertions)
  • make test (74 shell assertions and all Go tests)
  • sh -n scripts/normalize-commit-message.sh scripts/install-hooks.sh .githooks/commit-msg .githooks/pre-commit tests/commit-message-normalizer.sh
  • end-to-end accepted and rejected Git commit coverage (included in the shell suite)
  • git diff --check docs-backfill

Nightshift-Task: commit-normalize
Nightshift-Ref: https://github.com/marcus/nightshift
Nightshift-Task: commit-normalize
Nightshift-Ref: https://github.com/marcus/nightshift
Nightshift-Task: commit-normalize
Nightshift-Ref: https://github.com/marcus/nightshift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant