Skip to main content

Module commit_style

Module commit_style 

Source
Expand description

What commit-msg enforces, and how it decorates — as four git config keys.

commit-msg is an entrypoint rather than a Check (see registry.rs), so hook.skip and amont.severity.* do not reach it, and git exempts it from --no-verify. That left the hook that touches every single commit with no dial at all: its two most divisive rules — the gitmoji and the 50 character description budget — could be complied with or uninstalled, and nothing in between. Every other opinion this project holds has a dial. These are the ones this one was missing.

The keys are read through crate::config, so a value git cannot parse falls back to the shipped default and says so.

Structs§

Setting
One row of amont list’s commit-style block.
Style
Everything commit-msg needs to know about how this repository wants its messages checked and formatted.

Enums§

Gitmoji
Where the type’s gitmoji goes, if anywhere.

Constants§

DEFAULT_BODY_WRAP
DEFAULT_DESCRIPTION_MAX
DEFAULT_GITMOJI
DEFAULT_SUBJECT_MAX
KEY_BODY_WRAP
KEY_DESCRIPTION_MAX
KEY_GITMOJI
KEY_SUBJECT_MAX

Functions§

describe
The effective style, plus where each value came from.
render_subject
The one place a decorated subject line is built.