pub struct Style {
pub gitmoji: Gitmoji,
pub subject_max: usize,
pub description_max: usize,
pub body_wrap: usize,
}Expand description
Everything commit-msg needs to know about how this repository wants its
messages checked and formatted.
Fields§
§gitmoji: Gitmoji§subject_max: usize§description_max: usize§body_wrap: usize0 means never wrap.
Implementations§
Source§impl Style
impl Style
Sourcepub fn resolve() -> Style
pub fn resolve() -> Style
Read the four keys from the repository’s git config.
One --get-regexp first, then a typed read only for the keys it named.
With nothing configured — the overwhelming case, and the one on the
commit path — that is a single extra process rather than four.
Measured on the unconfigured path, 50 runs each: 26.2 ms before this
landed, 26.0 ms after. A wash, because the prescan replaced a process
rather than adding one — the git remote get-url upstream call the old
fork-suppression heuristic made on every single commit is gone.
Sourcepub fn warnings(&self) -> Vec<String>
pub fn warnings(&self) -> Vec<String>
Settings that cannot do what they look like they do.
Deliberately not printed by the hook. The commit path announces what
is in effect; amont list and amont setup — the two commands
whose whole job is reading configuration back — are where a setting that
makes no sense belongs. Putting a coherence essay in front of every
commit is how people learn to stop reading hook output.