Function: git-commit-check-style-conventions
git-commit-check-style-conventions is a byte-compiled function defined
in git-commit.el.
Signature
(git-commit-check-style-conventions FORCE)
Documentation
Check for violations of certain basic style conventions.
For each violation ask the user if she wants to proceed anyway.
Option git-commit-style-convention-checks controls which
conventions are checked.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/git-commit.el
(defun git-commit-check-style-conventions (force)
"Check for violations of certain basic style conventions.
For each violation ask the user if she wants to proceed anyway.
Option `git-commit-style-convention-checks' controls which
conventions are checked."
(or force
(save-excursion
(goto-char (point-min))
(re-search-forward (git-commit-summary-regexp) nil t)
(if (equal (match-str 1) "")
t ; Just try; we don't know whether --allow-empty-message was used.
(and (or (not (memq 'overlong-summary-line
git-commit-style-convention-checks))
(equal (match-str 2) "")
(y-or-n-p "Summary line is too long. Commit anyway? "))
(or (not (memq 'non-empty-second-line
git-commit-style-convention-checks))
(not (match-str 3))
(y-or-n-p "Second line is not empty. Commit anyway? ")))))))