From 7cd62c4567597d88e88ec6a38ae9ddce638734d5 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 1 Oct 2020 14:49:59 +0000 Subject: modules/emacs: add --no-gpg-sign to magit --- modules/workstation/emacs/init.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'modules/workstation') diff --git a/modules/workstation/emacs/init.el b/modules/workstation/emacs/init.el index 8f98f77004ef..5314534e7134 100644 --- a/modules/workstation/emacs/init.el +++ b/modules/workstation/emacs/init.el @@ -35,6 +35,19 @@ (global-set-key (kbd "C-x g") 'magit-status) (global-set-key (kbd "C-x M-g") 'magit-dispatch) +(with-eval-after-load "magit" + ;; Add a --no-gpg-sign option to Magit. This is only useful with + ;; commit.gpgsign=true. It would be nice if commit.gpgsign=true just + ;; meant that Magit showed the --gpg-sign option as enabled by + ;; default, and disabling it would make Magit pass --no-gpg-sign to + ;; git, but that's not currently the case, so we need a seperate + ;; option for --no-gpg-sign. See + ;; . + (dolist (command '(magit-commit magit-merge magit-cherry-pick + magit-revert magit-am magit-rebase)) + (transient-append-suffix command ["-S"] + '("=S" "Don't sign using gpg" "--no-gpg-sign")))) + ;;; Rainbow Delimiters ;;; (add-hook 'prog-mode-hook #'rainbow-delimiters-mode) -- cgit 1.4.1