pub fn head_commit_message(root: &Path) -> Option<String>Expand description
HEAD’s commit message, as a single string with newlines preserved between subject and body. The subject is the first line; everything after the first blank line is the body.
Returns None when:
gitisn’t on PATHroot(or any ancestor) isn’t inside a git repo- the repo has no commits yet (HEAD is unborn)
- the
git loginvocation otherwise exits non-zero
Used by the git_commit_message rule kind. Same advisory
posture as the rest of the git module: a non-git workspace
silently no-ops the rule rather than raising a hard error.