about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-10-01 14:49:59 +0000
committerAlyssa Ross <hi@alyssa.is>2020-10-01 14:49:59 +0000
commit7cd62c4567597d88e88ec6a38ae9ddce638734d5 (patch)
treea5a3956fa4981a0ed039343d61fdcc849fb8cadf /modules
parentfff43a2445d4dd854978eedf7eefe831baada32d (diff)
downloadnixlib-7cd62c4567597d88e88ec6a38ae9ddce638734d5.tar
nixlib-7cd62c4567597d88e88ec6a38ae9ddce638734d5.tar.gz
nixlib-7cd62c4567597d88e88ec6a38ae9ddce638734d5.tar.bz2
nixlib-7cd62c4567597d88e88ec6a38ae9ddce638734d5.tar.lz
nixlib-7cd62c4567597d88e88ec6a38ae9ddce638734d5.tar.xz
nixlib-7cd62c4567597d88e88ec6a38ae9ddce638734d5.tar.zst
nixlib-7cd62c4567597d88e88ec6a38ae9ddce638734d5.zip
modules/emacs: add --no-gpg-sign to magit
Diffstat (limited to 'modules')
-rw-r--r--modules/workstation/emacs/init.el13
1 files changed, 13 insertions, 0 deletions
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
+  ;; <https://github.com/magit/magit/issues/3832>.
+  (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)