Function: git-commit-ensure-comment-gap

git-commit-ensure-comment-gap is a byte-compiled function defined in git-commit.el.

Signature

(git-commit-ensure-comment-gap)

Documentation

Separate initial empty line from initial comment.

If the buffer begins with an empty line followed by a comment, insert an additional newline in between, so that once the users start typing, the input isn't tacked to the comment.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/git-commit.el
;;; Setup

(defun git-commit-ensure-comment-gap ()
  "Separate initial empty line from initial comment.
If the buffer begins with an empty line followed by a comment, insert
an additional newline in between, so that once the users start typing,
the input isn't tacked to the comment."
  (save-excursion
    (goto-char (point-min))
    (when (looking-at (format "\\`\n%s" comment-start))
      (open-line 1))))