refactor(vc): move git-commit to magit module

`git-commit` is no longer distributed with `magit` and no longer
declares its dependencies, causing "file missing: with-editor" and
similar errors for folks who don't have magit installed. Also, VC's
commit workflows don't utilize the mode, so there's no reason to keep it
in this module.

Ref: magit/magit@c170fcf399
Ref: #8003
This commit is contained in:
Henrik Lissner 2024-09-09 18:06:00 -04:00
parent bbb2cc1cb3
commit 07eae64509
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
3 changed files with 21 additions and 22 deletions

View file

@ -142,27 +142,6 @@ info in the `header-line-format' is a more visible indicator."
:n "gtc" #'git-timemachine-show-commit))
(use-package! git-commit
:hook (doom-first-file . global-git-commit-mode)
:config
(set-yas-minor-mode! 'git-commit-mode)
;; Enforce git commit conventions.
;; See https://chris.beams.io/posts/git-commit/
(setq git-commit-summary-max-length 50
git-commit-style-convention-checks '(overlong-summary-line non-empty-second-line))
(setq-hook! 'git-commit-mode-hook fill-column 72)
(add-hook! 'git-commit-setup-hook
(defun +vc-start-in-insert-state-maybe-h ()
"Start git-commit-mode in insert state if in a blank commit message,
otherwise in default state."
(when (and (bound-and-true-p evil-mode)
(not (evil-emacs-state-p))
(bobp) (eolp))
(evil-insert-state)))))
(after! browse-at-remote
;; It's more sensible that the user have more options. If they want line
;; numbers, users can request them by making a selection first. Otherwise

View file

@ -6,7 +6,6 @@
(package! smerge-mode :built-in t)
(package! browse-at-remote :pin "76aa27dfd469fcae75ed7031bb73830831aaccbf")
(package! git-commit :pin "0aa26864e3fc4e6949711a4821caf6819e7ab171")
(package! git-timemachine
;; The original lives on codeberg.org; which has uptime issues.
:recipe (:host github :repo "emacsmirror/git-timemachine")